store/[org.clojure/clojure "1.6.0"] clj::clojure.core/rest

Official Documentation

Add notes
Arities
==================================================
   [coll]

Docstring
==================================================
  Returns a possibly empty seq of the items after the first. Calls seq on its
  argument.

Source

(def
 ^{:arglists '([coll])
   :tag clojure.lang.ISeq
   :doc "Returns a possibly empty seq of the items after the first. Calls seq on its
  argument."
   :added "1.0"
   :static true}  
 rest (fn ^:static rest [x] (. clojure.lang.RT (more x))))

Example 1

Edit
(rest nil)
;; => ()

Example 2

Edit
(rest '(1 2 3 4 5))
;; => (2 3 4 5)

Example 3

Edit
(rest [1 2 3 4 5])
;; => (2 3 4 5)

(rest ["a" "b" "c" "d" "e"])
;; => ("b" "c" "d" "e")

Example 4

Edit
(rest '())
;; => ()

Example 5

Edit
;; A simple implementation using rest for recursing over a collection.  Note that (seq coll) is used as the test.
(defn my-map [func coll]
  (when-let [s (seq coll)]
    (cons (func (first s))
          (my-map func (rest s)))))

Uses on crossclj