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:

    Public opinion, a vulgar, impertinent, anonymous tyrant who deliberately makes life unpleasant for anyone who is not content to be the average man.
    —W.R. (William Ralph)

    There exists a species of transcendental ventriloquism by means of which men can be made to believe that something said on earth comes from Heaven.
    —G.C. (Georg Christoph)