Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #26344

Re: Y combinator

Newsgroups comp.lang.forth
Subject Re: Y combinator
References <a4aljf$2q2$1@news.tuwien.ac.at> <85eh82hjlr.fsf@junk.nocrew.org> <2013Oct3.150934@mips.complang.tuwien.ac.at>
From Lars Brinkhoff <lars.spam@nocrew.org>
Organization nocrew
Date 2013-10-07 15:06 +0200
Message-ID <85vc19dydi.fsf@junk.nocrew.org> (permalink)

Show all headers | View raw


anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> Lars Brinkhoff <lars.spam@nocrew.org> writes:
>>: y ( xt1 -- xt2 )   here tuck 2>r  1 cells allot
>>   :noname r> postpone literal postpone @ r> compile, postpone ;
>>   dup rot ! ;
>
> Nice.
>
> Now Curry's definition of Y is
>
> Y = lambda f.(lambda x.f (x x))(lambda x.f (x x))
>
> I am wondering what capabilities of Forth we have to remove until we
> have to go to these lengths.

"Why" indeed.

I was tempted to submit this smaller version, but felt that the named
definition was not quite in the spirit of the original Y.

: y ( xt "name" -- )   >in @ create >in ! , ' ,  does> 2@ execute ;

Back to comp.lang.forth | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Y combinator Lars Brinkhoff <lars.spam@nocrew.org> - 2013-10-03 09:57 +0200
  Re: Y combinator anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-10-03 13:09 +0000
    Re: Y combinator Lars Brinkhoff <lars.spam@nocrew.org> - 2013-10-07 15:06 +0200

csiph-web