On Jun 8, 2014 3:13 AM, "Roelof Wobben" <r.wobben / home.nl> wrote:
>
> Currying is harder then I thought.
>

What you're doing is not currying.

I gave you an example using currying, *and* an example that correctly
evaluates one(add(one))

Here's one without shadowing:

  def one fn=nil
    if fn
      fn[1]
    else
      1
    end
  end
  def add x
    ->(y) { y + x }
  end

*I made this up off the top of my head, on my phone, in bed. It probably
works, though. #add is a partially applied, curried version of y + x, but
#one is just intentional obscurity