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.
  • I found it was actually easier to deal with the Y combinator if you implement it in terms of the U combinator, which is just your basic fixed point combinator.

    sub U {
        my $f = shift;
        sub { $f->($f, @_) };
    }

    sub Y {
        my $f = shift;
        U(sub {
            my $h = shift;
            sub {
                $f->(U($h)->())->(@_)
            }
        })->();
    }

    I also recentl [perl.org]