[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] [approve] Function-block change to return function result, and accept arguments

--- James McCartney <asynth@xxxxxx> wrote:

> I don't really see the point. You can just wrap
> another function. Give 
> me an example of how this could be useful.

I tend to agree with you, but for the sake of

In methods you can do:

meth { |a|
  a.isEven.if({ ^a });
  // several lines of processing

These guys want to do the same thing in a function:

meth = { |break, a|
  a.isEven.if({ break.value(a) });
  // processing


I know, it's nothing that can't be done by other
means, but this is what they want...


____   James Harkins /// dewdrop world
\  /   jamshark70@xxxxxxxxx
 \/    http://www.dewdrop-world.net

"... love and hot pants, peace, harmony..."
  -- Dick Lee, Hot Pants: The Musical