And that's precisely my question, where does that one line go?
In the modules/scripts that use the old API.
Besides, you wouldn't need that List::Part::part.assuming magic, ,you could just write a wrapper routine.
You don't have to use a curried subroutine - but it would seem a very natural idiom to me. You're taking an existing subroutine and freezing one of its arguments. Exactly what currying does.
Yes you could write a wrapper subroutine but currying seems more natural to me (perhaps because I've used languages before where currying is common).
If you modify the main() of each old script: it's a lot of work; how do you know you got them all?; since you're using my, the currying will be active in the file where you put the currying, which is fine for a one-file program, but what about more complex things?
There isn't an easy way of doing it ;-) It was just (IMO) a way for TheDamian to demo currying in a vaguely sane context.
In reply to Re^3: Perl 6 Exegesis 6 pg 7
by adrianh
in thread Perl 6 Exegesis 6 pg 7
by TomDLux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |