|
 |
>> filter odd [1, 2, 3, 4]
>> It filters out the *even* numbers.
>
> Yes. And the odd numbers stay behind in the filter. If you filter out
> coffee grounds, what do you have when you're done? Grounds, or coffee?
>
> The problem with a real filter is it separates, rather than selects.
> When you filter coffee, are you filtering the grounds or the drinkable
> stuff? Neither: you're separating the two.
I still prefer Smalltalk's "select" and "reject". Makes much more sense
to me. :-P
> I'm kind of surprised "filter" doesn't return both, given it would seem
> (semantically) fairly easy not to calculate whichever half doesn't get
> used.
Nope; that's "partition". (Which at least has a sensible name.)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |