On Fri, Apr 30, 2010 at 2:30 PM, Michael Wood <[email protected]> wrote:
> On 30 April 2010 18:25, Mark J. Reed <[email protected]> wrote:
> [...]
>> (defn pairup
>> ([a b] (list [a b]))
>> ([a b & rest] (cons [a b] (apply pairup rest))))
Why not:
(defn pairup
( [] nil )
( [ a b & rest ] ( cons [ a b ] ( apply pairup rest ) ) ) )
(or do you want to force at least two elements be present?)
Oh, and "Hi!", I'm new here :)
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
--
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