Live data from Hacker News

The Y Combinator (no, not that one) – A Crash Course on Lambda Calculus

medium.com

1–10 of 51 posts

Re: The Y Combinator (no, not that one) – A Crash Course on Lambda Calculus

#4
Y Combinator in TXR's embedded Lisp dialect:

    @(do
      ;; The Y combinator:
      (defun y (f)
        [(op @1 @1)
         (op f (op [@@1 @@1]))])

      ;; The Y-combinator-based factorial:
      (defun fac (f)
        (do if (zerop @1)
               1
               (* @1 [f (- @1 1)])))

      ;; Test: 4! -> 24
      (pprinl [[y fac] 4]))

Re: The Y Combinator (no, not that one) – A Crash Course on Lambda Calculus

#6
post #2

One of my favorite programming videos: Jim Weirich on the Y Combinator https://www.youtube.com/watch?v=FITJMJjASUs

Thanks for letting me discover the work of that man. Its approach to learning about something by actually doing it really shines in the video you linked.

Re: The Y Combinator (no, not that one) – A Crash Course on Lambda Calculus

#7
post #2

One of my favorite programming videos: Jim Weirich on the Y Combinator https://www.youtube.com/watch?v=FITJMJjASUs

If anyone hasn't seen this I highly recommend it, if not just because Weirich was a great guy and was very entertaining. RIP.

Re: The Y Combinator (no, not that one) – A Crash Course on Lambda Calculus

#8
Has the Y combinator been useful to anything? Has it been used in any software in a role other than pedagogic?

It's a beautiful way to make a recursive call without binding the function to an identifier, but has it actually proven useful? It would seem that languages that allow that make it easy to use the Y combinator also typically make it easy to use named recursion with a permanent or a temporary name.

Re: The Y Combinator (no, not that one) – A Crash Course on Lambda Calculus

#10
My page on lambda diagrams at http://www.cwi.nl/~tromp/cl/diagrams.html has a nice picture of the Y-combinator at the top, and this note at the bottom:

The diagram in the title, produced by the postscript code below, is a slightly deformed alternative Y diagram made to look like a Y.

    %!PS-Adobe-2.0 EPSF-2.0
    %%BoundingBox:0 0 118 110
    /m{moveto}def/l{lineto}def/c{concat 6 m 0 6 l 7 8 m 0 8 l l l 3 6 l 2 6 m 7 6 l
    3 4 m 6 4 l 6 6 l stroke}def 3 0 0 0 1[-8 4 0 8 60 9]c 3 2 0 2 2[-1 1 0 1 0 0]c
Post reply on HN