From: boris@... Date: 2014-02-22T05:29:26+00:00 Subject: [ruby-core:60976] [ruby-trunk - Feature #9548] Module curry Issue #9548 has been updated by Boris Stitnicky. @mame, I don't quite get these nuances between "currying" and "partial application". I could try and learn them, but my approach is different here. I do not want to learn. I want to be stubborn like Amazonians when first confronted with Bible. Pragmatically, partial application is all I need. And since it's long, so let the word be `curry`. Whole point of using this hunger evoking word (Anglosaxon surnames notwithstanding) is because it's short and unique, like "quark". And, a shameful secret, my mnemonic for curry is, oh, it's like with food, there is something (mutton, chicken, veggies...), and you can add different types of curry to it. And `#curry` decides about curry, and I then decide about something. So it's "partial application". I suggest to cannibalize the theorists and settle for this na��ve interpretation of `curry`. (Just in case that I am really missing something here, the theorists can go find a different word for that something after we steal `curry` from them and use it for "partial application".) @sam, see #7939 for my take on what `Proc#curry` should do. ---------------------------------------- Feature #9548: Module curry https://bugs.ruby-lang.org/issues/9548#change-45379 * 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/