Fixed-point Combinator - Implementing Fixed-point Combinators - Anonymous Recursion By Other Means

Anonymous Recursion By Other Means

Although fixed point combinators are the standard solution for allowing a function not bound to an identifier to call itself, some languages like Perl provide a syntactical construct which allows anonymous functions to refer to themselves. For example, in Perl 5.16 and above, one can write the following:

use feature ":5.16"; sub { my $x = shift; $x == 0 ? 1 : __SUB__->( $x - 1 ); }

Read more about this topic:  Fixed-point Combinator, Implementing Fixed-point Combinators

Famous quotes containing the words anonymous and/or means:

    Men, my dear, are very queer animals, a mixture of horse- nervousness, ass-stubbornness, and camel-malice—with an angel bobbing about unexpectedly like the apple in the posset, and when they can do exactly as they please, they are very hard to drive.
    Oh, England. Sick in head and sick in heart,
    Sick in whole and every part,
    And yet sicker thou art still
    For thinking that thou art not ill.
    —Thomas Henry Anonymous (1825–95)

    The American spring is by no means so agreeable as the American autumn; both move with faltering step, and slow; but this lingering pace, which is delicious in autumn, is most tormenting in the spring.
    Frances Trollope (1780–1863)