614 karma · joined October 26, 2011
You won't get entire match if you have several captures, but you can add a pair of parentheses around your regexp to circumvent this limitation.
As you can see, plenty of flexibility here. Also, you can fallback to naked re once or twice a year, not that much trouble.
But basically it just helps avoiding nesting functions, a common boilerplate when writing decorators.
By the way, first piece of code can become much more hairy with time.
Some of itertools things are just reexports and builtins are extended purely - so that they behave the same given same arguments - with negligible performance overhead.
Anyway, if you are such a purist you still have at least two options: 1. just `import funcy` and use it as `funcy.map(...)` or `funcy.keep(...)` 2. Import only functions you use, avioding name clashes, use `from funcy import map as xmap` to import extended builtins.
That was a deliberate choice.
So, first example is the same as:
some(bool, [0, '', -1, None, 2])I'm trying to (require 'http.async.client)