3uke Palmer writes:
: Perhaps if it's generated with placeholders, the C<.curry> would be 
: implicit. That way we can stay terse when the situation is simple. Like 
: with Damian's C<given>...C<when> example.  When I'm writing scripts, I 
: don't  want to type those 6 characters, but if I'm doing structured 
: programming, the clearer the better. To parallel this, when I'm writing 
: scripts, I'm going to use placeholder functions, but in structured 
: programming, I'm probably not.

I don't think the switch example is actually currying.  It's really
just using a self-declared parameter, which the switch statement is
smart enough to feed the proper "other" argument to.  Offhand I don't
see a generalization of it that would let us pass in fancier curries
usefully--it's got to resolve to a function that has a boolean result.
What would a switch (or a C<=~> for that matter) do with a two-argument
curry?  And is that red, yellow, or green curry?

Larry

Reply via email to