Skip to content

Instantly share code, notes, and snippets.

@IceDragon200
Last active August 29, 2015 14:21
Show Gist options
  • Save IceDragon200/65a8f73b0589eedac758 to your computer and use it in GitHub Desktop.
Save IceDragon200/65a8f73b0589eedac758 to your computer and use it in GitHub Desktop.
def partial(func, arg)
->(*args) { func.call(arg, *args) }
end
f = ->(a, b, c) { [a, b, c] }
fail unless [1, 2, 3] == partial(partial(partial(f, 1), 2), 3).call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment