{"id":7314,"date":"2022-12-20T19:37:40","date_gmt":"2022-12-20T22:37:40","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/mooseautoboxcode-man3\/"},"modified":"2022-12-20T19:37:40","modified_gmt":"2022-12-20T22:37:40","slug":"mooseautoboxcode-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/mooseautoboxcode-man3\/","title":{"rendered":"Moose::Autobox::Code (man3)"},"content":{"rendered":"<h1 align=\"center\">Moose::Autobox::Code<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#VERSION\">VERSION<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#SUPPORT\">SUPPORT<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT AND LICENSE\">COPYRIGHT AND LICENSE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Moose::Autobox::Code \u2212 the Code role<\/p>\n<h2>VERSION <a name=\"VERSION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">version 0.16<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use Moose::Autobox; <br \/> my $adder = sub { $_[0] + $_[1] }; <br \/> my $add_2 = $adder\u2212>curry(2); <br \/> $add_2\u2212>(2); # returns 4 <br \/> # create a recursive subroutine <br \/> # using the Y combinator <br \/> *factorial = sub { <br \/> my $f = shift; <br \/> sub { <br \/> my $n = shift; <br \/> return 1 if $n < 2; <br \/> return $n bodies manpages.csv script_extrae_body.sh script.sh usr $f\u2212>($n \u2212 1); <br \/> } <br \/> }\u2212>y; <br \/> factorial(10) # returns 3628800<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This is a role to describe operations on the Code type.<\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">&#8220;curry (@values)&#8221; <br \/> &#8220;rcurry (@values)&#8221; <br \/> &#8220;conjoin (&#038;sub)&#8221; <br \/> &#8220;disjoin (&#038;sub)&#8221; <br \/> &#8220;compose (@subs)&#8221;<\/p>\n<p style=\"margin-left:17%;\">This will take a list of @subs and compose them all into a single subroutine where the output of one sub will be the input of another.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"4%\">\n<p>&#8220;y&#8221;<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"51%\">\n<p>This implements the Y combinator.<\/p>\n<\/td>\n<td width=\"32%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"4%\">\n<p>&#8220;u&#8221;<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"51%\">\n<p>This implements the U combinator.<\/p>\n<\/td>\n<td width=\"32%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\">&#8220;meta&#8221;<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><http:\/\/en.wikipedia.org\/wiki\/Fixed_point_combinator> <br \/> <http:\/\/blade.nagaokaut.ac.jp\/cgi\u2212bin\/scat.rb\/ruby\/ruby\u2212talk\/20469><\/p>\n<h2>SUPPORT <a name=\"SUPPORT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Bugs may be submitted through the <small>RT<\/small> bug tracker <https:\/\/rt.cpan.org\/Public\/Dist\/Display.html?Name=Moose-Autobox> (or bug\u2212Moose\u2212Autobox@rt.cpan.org <mailto:bug-Moose-Autobox@rt.cpan.org>).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There is also a mailing list available for users of this distribution, at <http:\/\/lists.perl.org\/list\/moose.html>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There is also an irc channel available for users of this distribution, at &#8220;#moose&#8221; on &#8220;irc.perl.org&#8221; <irc:\/\/irc.perl.org\/#moose>.<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Stevan Little <stevan.little@iinteractive.com><\/p>\n<h2>COPYRIGHT AND LICENSE <a name=\"COPYRIGHT AND LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This software is copyright (c) 2006 by Infinity Interactive, Inc.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This is free software; you can redistribute it and\/or modify it under the same terms as the Perl 5 programming language system itself.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Moose::Autobox::Code \u2212 the Code role <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3634],"class_list":["post-7314","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-mooseautoboxcode"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7314"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7314\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}