Issue #9548 has been updated by Boris Stitnicky.


I have just learned about the existence of `Method#parameters` method, which would enable to write `Module#curry` without asking for core-level syntax on par with `alias`. The supporting facts for this feature request are thus slightly weaker than I thought when writing it.

----------------------------------------
Feature #9548: Module curry
https://bugs.ruby-lang.org/issues/9548#change-45405

* Author: Boris Stitnicky
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
I would like to beg for either `Module#curry` method with syntax

```ruby
module Foo
  curry( :sym2, :sym1, 0 => 42, 1 => 43, 3 => 44, foo: "bar" )
end
```

or `curry` directive similar to the existing `alias` directive

```ruby
module Foo
  curry sym2 sym1( 42, 43, *, 44, foo: "bar )
end
```

Example usage:

```ruby
module MyMath
  def power a, b
    a ** b
  end

  curry square power( *, 2 )
  curry square_root power( *, 0.5 )
  curry cube( *, 3 )
  curry pow2 power( 2, * )
  curry pow_e power( Math::E, * )
  curry pow10 power( 10, * )
end
```




-- 
http://bugs.ruby-lang.org/