Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Now, it has been a while since I messed around with Perl 6, but IIRC it would look something like this:

    sub add ($x, $y) { $x + $y }
    &inc := &add.assuming(x<1>);

    This is actually much closer to what Haskell is doing too, since when you pass less then the expected number of arg to a function in Haskell it will "auto-curry" it for you. It actually does this kind of as a side-effect of being built atop a more pure lambda calculus engine, since in lambda calc functions can only have one argument.