Clojure sequences implement the ISeq interface to make a thread-safe logical list. Sequences produced by functions in Clojure are usually lazy. This means that a value within the list isn't computed until the value is needed.
Learning to manipulate sequences will save you both time and many lines of code. Some sequence manipulation forms do the same thing and only differ by execution speed. Please be sure to pay extra attention when execution times are displayed in the examples.
To test if an object implements the ISeq interface, use the
user> (seq? ) false user> (seq? (seq )) true user> (seq ) nil
nil isn't an acceptable value, use the
sequence form to return an empty sequence instead of