Sent from a random iPhone
On Jul 12, 2013, at 1:49, Joshua Landau email@example.com wrote:
On 12 July 2013 09:03, Andrew Barnert firstname.lastname@example.org wrote:
I'd personally be in favour of the notion of also allowing strings as the first argument, so you could instead write:
data = fold("+=", , iterables)
I like this idea, but only if it's added to other functions in the stdlib where it makes sense, and easy to add to new functions of your own.
Is there a use-case for that last part? It strikes me as equivalent to messing with builtins, which is largely unliked.
I think you missed the word "to" in "add to". I don't want to create functions that can be passed to fold as if they were operators, I want to create functions that can take operators the same way fold does.
The former is akin to messing with builtins, which is bad; the latter is akin to using them.