On Sun, Oct 05, 2003 at 12:26:48AM -0400, Jeremy Fincher wrote: ... > > def some(pred, seq): > > "Returns True if pred(x) is True at least one element in the iterable" > > return True in imap(pred, seq) > > > > def no(pred, seq): > > "Returns True if pred(x) is False for every element in the iterable" > > return True not in imap(pred, seq) > > I would instead call some "any" (it's more standard among the functional > languages I've worked with), and I wouldn't bother with "no," since it's > exactly the same as "not any" (or "not some," as the case may be). Yep, seems better. -- Chris Stork <><><><><><><><><><><><><> http://www.ics.uci.edu/~cstork/ OpenPGP fingerprint: B08B 602C C806 C492 D069 021E 41F3 8C8D 50F9 CA2F
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4