Re: I still don't get MAPCAN
- From: Tim Bradshaw <tfb@xxxxxxxx>
- Date: Thu, 17 Aug 2006 21:20:01 +0100
On 2006-08-17 20:39:00 +0100, Ken Tilton <kentilton@xxxxxxxxx> said:
MAPCAN is terribly useful when you want to collect only some things:
(defun find-interesting (huge-list)
(mapcan #'(lambda (e) (if (interestingp e) (list e) nil)) huge-list))
ick.
(loop for e in huge-list when (interestingp e) collect e)
Well, sure.
--tim (and that's the first Lisp I've written for nearly 2 years!)
Still rebuilding after the weight of all those Java references collapsed the home?
No, I find Java fine for what I use it for (for instance generating hand-crafted syslog packets or something). I just don't really write programs any more, I `architect security solutions' or some such bull***. I'm sure I'd use Lisp if I did program.
--tim
.
- References:
- I still don't get MAPCAN
- From: jmckitrick
- Re: I still don't get MAPCAN
- From: Bill Atkins
- Re: I still don't get MAPCAN
- From: jmckitrick
- Re: I still don't get MAPCAN
- From: Tim Bradshaw
- Re: I still don't get MAPCAN
- From: Ken Tilton
- I still don't get MAPCAN
- Prev by Date: Re: why is lisp fast?
- Next by Date: Re: OT: sexps for other languages?
- Previous by thread: Re: I still don't get MAPCAN
- Next by thread: Re: I still don't get MAPCAN
- Index(es):
Loading