using sequence manipulation for numerical operations (without converters) is a bit heavyweight, and this would be a great example for recur instead:
user> (defn gcd [ab] (if (zero? b) a (recur b (mod ab))))
This saves some effort / time that will be built into the build sequences, which are then discarded. In this case, he creates a sequence of two sequences of numbers, turns them into a sequence of two sets, and then splits them into one set, of which the largest value is the answer.
In addition, in the general case, when defining a vars containing functions, use defn (short for the define function), it automatically adds interesting things that help the tools a lot, for example, displaying types of arguments, etc.
source share