Hi Nicholas,

cons returns a Cons type, which is printed like a list.

Clojure> (type (consĀ­ 1 []))
clojure.lang.Cons

Many functions that deal with collections generally return seq's, which
also print like lists.

See: http://clojure.org/sequences

Thanks,
Ambrose

On Wed, Nov 9, 2011 at 2:21 AM, Nicolas Garcin <
nicolas.etienne.gar...@gmail.com> wrote:

> Hello,
>
> I'm a new Closure user and I'm wondering why the 'cons' function
> applied on a vector returns a list.
> Ex:
> user=> (def v1 [:one :two])
> #'user/v1
> user=> (cons :three v1)
> (:three :one :two)
> user=>
>
> Thanks for your help,
> Regards,
> Nicolas
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to