function | since v0.0-927 | clojure.core/rest | Edit |
(rest coll)
Returns a possibly empty sequence of the items after the first item.
Calls seq
on its argument.
(rest [1 2 3])
;;=> (2 3)
(rest [1 2])
;;=> (2)
(rest [1])
;;=> ()
(rest [])
;;=> ()
Returns a possibly empty seq of the items after the first. Calls seq on its argument.
(defn ^seq rest
[coll]
(if-not (nil? coll)
(if (implements? ISeq coll)
(-rest coll)
(let [s (seq coll)]
(if s
(-rest ^not-native s)
())))
()))