This function returns the first item in the list.
Following is the syntax.
(first lst)
Parameters − ‘lst’ is the list of items.
Return Value − The first value from the list.
Following is an example of first in Clojure.
(ns clojure.examples.example (:gen-class)) (defn example [] (println (first (list 1 2,3)))) (example)
The above program produces the following output.
1