I think you forgot a parenthesis

Tags: ,

28 Responses:

  1. colubra says:

    nope: if we count from the left there're 3 left-parens, and then two right-parens. Then two left-parens, then 3 right-parens.
    It still balances.

    But I did have to double-check. ;)

  2. is that a quine?

    that's a quine, isn't it?

  3. benediktus says:

    I'd rather...

  4. tjic says:

    ...doesn't seem to work on flesh buffers.

    So, yeah, the old +1 / -1 trick.

    • spike says:

      Oh I don't know about that.
      I seem to remember a few flesh-buffers I've forward-sexp'd.

      *waits patiently for ensuing backward-sexp reference*

  5. unpvg says:

    So if you google around for it, it seems to be usually represented with fewer parens.
    Like there http://en.wikipedia.org/wiki/Y_combinator

  6. nightrider says:

    See, at first glance I was thinking there were just misplaced perens midway through... but for once, I think someone on wikipedia may have known what they were talking about. I checked there and sure enough... that's the right one. But... (there's always a big but,) while Curry's combinator was the first discovered, there's definitely better combinators to geek out over.

    If you're trying to get reduction to work with Curry's Y combinator, you're bound to run into problems. Reducing f (Y f) for example will require backwards beta reduction at some point. Teh suck.

    Alan Turing's T combinator manages to avoid that issue, though:

    T = (λx.λy.y (x x y)(λx.λy.y (x x y))

    but my favorite one is this because it's the shortest one available when converted to the S and K basic combinators:

    Y' = (λ.x.λ.y.xyx)(λx.λy.(x(λ.x.λ.y.xyx)yx)))

    If it were me, I would have gotten the latter tattooed on my arm. It's worth *way* more geek points. I mean, Curry started it, but you have 12 terms in the final combinator as opposed to Curry's initial 18.

    Ummm... Yeah.

    • pozorvlak says:

      I once met a guy at a Perl mongers' meeting who had Euclid's proof of Pythagoras' theorem tattooed on his upper arm. I got into a loud drunken argument with him over whether or not its historical significance outweighed its lack of elegance. I don't think either of us emerged from that argument with much dignity, but at least I didn't have an ugly proof permanently etched on my body.

  7. kakos says:

    Yikes. You freaked me out for a moment. The parens are all matched up correctly. As far as the correct number of parens, the extra parens I have as opposed to the wikipedia version doesn't really change anything with the formula. When I got the tattoo, the source I used to double check it used the extra parens.

    As far as why I got this particular one instead of many of the other more elegant ones? Well, this is by far the most famous fixed-point combinator and it is far more iconic than many of the others.

  8. hober says:

    What's this obsession with the Y combinator. You people have no idea what you're dealing with. It'll eat you alive one day.

    -- The Cube

  9. sckot says:

    It'd be easier to add another paren than remove one.