4 ms·
Understanding the Y Combinator using Java (2009)
- derekp7 13y agoWhenever someone asks me what a Y combinator is, I tell them it is basically like a Klein bottle -- that's the closest analogy I've found. Of course, then they ask me what a Klein bottle is. After explaining that, they look at me weird.
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- bdkoepke 13y agoHere is an example using the ycombinator to transparently add memoization to a function. This enables you to get the performance boost of dynamic programming in java without having to rewrite recursion as iteration. (The code uses jdk8 but could be done without it). http://pastebin.com/as5xcWXp http://pastebin.com/as5xcWXp