------------------------- clojure.core/seq ([coll]) Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable. ------------------------- clojure.core/seq? ([x]) Return true if x implements ISeq -----
Obviously empty? based on seq. what is the difference between empty? and zero? I am confused at the impasse.
clojure.core/empty? ([coll]) Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))
And further:
(not (seq? ())) ;;false (not (seq ())) ;;true (not nil) ;;true
source share