Add `curry` and `uncurry`
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 19
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Add curry and uncurry functions. I’m not sure they’re particularly useful to be honest but given the confusion between currying and partial application in the R community it would have a nice educational effect to contrast the two operations of currying and partial function application.
Semantics (WLOG):
curry(f)returns a function that’s a curried version off.uncurry(g)returns a function that’s an uncurried version ofg.length(args(curry(f))) == 1.identical(uncurry(curry(f)), f).
Point (4) in particular might require some gymnastics if f is a closure — although strict identity is probably not required as long as the observable effect is identical.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named in the issue. Start by reading the linked init.r reference and inspecting existing functional helpers in the repository; define completion against the listed curry/uncurry semantics, including argument length and round-trip behavior for closures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100