Lisp (16)

8 Name: #!/usr/bin/anonymous : 2007-12-28 04:09 ID:Px/Nyeg6

>>6

Your sub list doesn't work for list(qw('foo bar')), or any list() using references and your sub liststar is wrong for liststar(qw(a))

In lisp, you'd usually use a tail-cdr algorithm- except on implementations which cdr-code (in which case list maps neatly to a primitive). In practice, reverse is so absurdly fast in perl that it usually isn't worth optimizing away.

This thread has been closed. You cannot post in this thread any longer.