You're viewing version 1.2.0 of cons. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (cons x seq)
Returns a new seq where x is the first element and seq is
the rest.

1 Example top

  • user=> (cons 1 '(2 3 4 5 6))
    (1 2 3 4 5 6)
    
    user=> (cons [1 2] [4 5 6])
    ([1 2] 4 5 6)
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/conj

    conj[oin]. Returns a new collection with the xs 'added'. (conj ni

Log in to add a see also.

Comments top

No comments for cons. Log in to add a comment.