In this guide, we will discuss Clojure Lists rest. Returns the remaining items in the list after the first item.
Syntax
Following is the syntax.
(rest lst)
Parameters β βlstβ is the list of items.
Return Value β A list of items with the first item removed.
Example
Following is an example of rest in Clojure.
(ns clojure.examples.example (:gen-class)) (defn example [] (println (rest (list 1 2,3)))) (example)
Output
The above program produces the following output.
(2 3)
Next Topic : Click Here
Pingback: Clojure - Lists conj | Adglob Infosystem Pvt Ltd
Pingback: Clojure - Lists | Adglob Infosystem Pvt Ltd