Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

I forgot..

Name: Anonymous 2011-03-09 8:45

What standard function does (remove-if #'null (map #'f xs))?

Name: Anonymous 2011-03-09 8:52

Isn't that compact enough? Although map does take another argument before the function.

Name: Anonymous 2011-03-09 8:55

>>2
(filter #'f  xs) would be more readable.

Name: >>2 2011-03-09 8:56

Also, (remove nil ...) would be a bit faster. If you didn't need the results, you could also use :key instead.

Name: Anonymous 2011-03-09 8:56

>>3
Sure, but that's not a standard CL function (what OP asked for), but a common utility people use.

Name: Anonymous 2011-03-09 8:59

>>5
Scheme and Haskell do include filter function. Why CL doesn't?

Name: Anonymous 2011-03-09 9:20

>>6
remove+map(car) and remove-if/remove-if-not are pretty much equivalent to it. If you want to write your own filter utility, it won't be longer than 2 lines.

Name: Anonymous 2011-03-09 9:22

Name: Anonymous 2011-03-09 10:06

>>8
Get the fuck out.

Name: Anonymous 2011-03-09 10:10

>>9
Ok. I'll go use PHP. It already includes everything.

Name: Anonymous 2011-03-09 10:12

>>10
my_squirrel_this_time_please_do_really_escape_string_yes_im_serious($string)

Name: Anonymous 2011-03-09 10:16

In Racket it's filter-map.

Don't change these.
Name: Email:
Entire Thread Thread List