Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This example is not very different from an object oriented approach (an opaque interface with a "contains" method). That said, in a functional setting the tail recursion is great for functions like union and intersect.


Sure, and functions can feel a lot like OO. I often think of it as though OO were blown apart into all of its constituent parts and those parts were made available. Then, further, those parts "hang together" better than the variety of OO formalisms ever did anyway.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: