(mapcan #'(lambda (x) (and (numberp x) (list x))) list)
(loop for x in list
when (numberp x) collect x)
I agree with this example. Once I learned LOOP I never used the
above idiom again.
[noise]
Robert L. <No_spamming@noWhere_7073.org> wrote:
[noise]Wow, the quoted text in this post seems to be from 1994. Trolls gonna
troll, I suppose.
Comments on LISP are not noise in comp.lang.lisp.
Answering an old post is not trolling.
(mapcan #'(lambda (x) (and (numberp x) (list x))) list)
(loop for x in list
when (numberp x) collect x)
I agree with this example. Once I learned LOOP I never used the
above idiom again.
Barry Margolin wrote:
(mapcan #'(lambda (x) (and (numberp x) (list x))) list)
(loop for x in list
when (numberp x) collect x)
I agree with this example. Once I learned LOOP I never used the
above idiom again.
(filter number? '(a b c 1 2 3))
(1 2 3)
(mapcan #'(lambda (x) (and (numberp x) (list x))) list)
(loop for x in list
when (numberp x) collect x)
I agree with this example. Once I learned LOOP I never used the
above idiom again.
Barry Margolin wrote:
(mapcan #'(lambda (x) (and (numberp x) (list x))) list)
(loop for x in list
when (numberp x) collect x)
I agree with this example. Once I learned LOOP I never used the
above idiom again.
(filter number? '(a b c 1 2 3))
(1 2 3)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 418 |
Nodes: | 16 (0 / 16) |
Uptime: | 16:28:41 |
Calls: | 8,795 |
Calls today: | 7 |
Files: | 13,300 |
Messages: | 5,966,725 |