On Fri, Jan 22, 2010 at 4:55 PM, ataggart <[email protected]> wrote: > > > On Jan 22, 1:30 pm, samppi <[email protected]> wrote: >> This is not a big deal: it is a quibble with a weird and inconvenient >> behavior of list*: when given an empty sequence, it returns nil >> instead of the empty list. Why is this? According to list*'s >> documentation, list* should always return a list. > > Judging from the code for list*, as well as its usage in apply, I > infer the return value is supposed to adhere to seq semantics. What > issue were you having such that returning a nil (as opposed to an > empty list) was a problem? >
Yes, list and list* date from the early days of Clojure when there was more conflation of lists and seqs, and should probably be better named seq-of and seq-of*. I'll have to think about whether list* is really possible (i.e. promising type of list), since the objective is to not copy the last arg. Rich -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
