1) What's a good way to add to the end of a list? You could reverse it then cons then reverse it again You could convert to vector and use (conj.. or some such
Both of the above seem very kludgey Java .add is not available I did find however, you can form a 1-element list from the item and concat it, so something like: (concat '(a b c) (list 'item)) does the trick. Is that the best way? 2) Whats a good way to add some items into the middle of a list You could split-at then pick out the results and use concat with new items in-between Again, java add index not supported Any better ways? 3) What does "Does not retain the head of the sequence." mean in regards to (doseq ..) I thought I understood but was unable to reproduce those results just now.. 4) Is there not a way to define a function with one argument, and have that argument be optional? or have only optional arguments? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
