Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: [RFC: Cool Uses for Perl] Heavy currying: weighted randomized word generator for conlangers

by flowdy (Scribe)
on Jun 29, 2014 at 16:17 UTC ( [id://1091647]=note: print w/replies, xml ) Need Help??


in reply to Re: [RFC: Cool Uses for Perl] Heavy currying: weighted randomized word generator for conlangers
in thread [RFC: Cool Uses for Perl] A weighted randomized word generator for conlangers

Thank you very much for reveal my confusion. I corrected my post accordingly. To perlify your example:
sub curriable_add { my ($first, $second) = @_; croak "first argument is undefined" if !defined $first; return $first + $second if defined $second; return sub { $first + shift }; }
  • Comment on Re^2: [RFC: Cool Uses for Perl] Heavy currying: weighted randomized word generator for conlangers
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1091647]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 06:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found