X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FAutobox%2FCode.pm;h=14c07a3e25f3504338b76b60f916dabe1c37cd43;hb=a1f00ce9bc1114d8573e56079e46db8687a01602;hp=e19ee5470e258912d4b3da097e78cdc484390868;hpb=bb5a920e543934195a1c4c236ed63183aaa0615d;p=gitmo%2FMoose-Autobox.git diff --git a/lib/Moose/Autobox/Code.pm b/lib/Moose/Autobox/Code.pm index e19ee54..14c07a3 100644 --- a/lib/Moose/Autobox/Code.pm +++ b/lib/Moose/Autobox/Code.pm @@ -2,7 +2,7 @@ package Moose::Autobox::Code; use Moose::Role 'with'; use Moose::Autobox; -our $VERSION = '0.02'; +our $VERSION = '0.13'; with 'Moose::Autobox::Ref'; @@ -32,6 +32,8 @@ sub conjoin { return sub { $f->(@_) && $f2->(@_) } } +# fixed point combinators + sub u { my $f = shift; sub { $f->($f, @_) }; @@ -39,15 +41,9 @@ sub u { sub y { my $f = shift; - (sub { my $h = shift; sub { $f->(($h->u())->())->(@_) } }->u())->(); + (sub { my $h = shift; sub { $f->(($h->u)->())->(@_) } }->u)->(); } -#sub dump { - #my ($self) = @_; - #require Data::Dump::Streamer; - #return Data::Dump::Streamer::Dump($self)->Out(); -#} - 1; __END__ @@ -124,6 +120,8 @@ This implements the U combinator. =item L +=item L + =back =head1 BUGS @@ -138,7 +136,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L