1,374 more words
For some time now I’ve been floating the idea of writing a book about category theory that would be targeted at programmers. Mind you, not computer scientists but programmers — engineers rather than scientists.
Tags » Haskell
In the previous post in this series, I gave an example of trees in Python and Haskell:
class Tree: def __init__(self, value=None, left=None, right=None): self.value = value self.left = left self.right= right def preorder(self): if self.value is None: return  else: if self.left is None: left_pre =  else: left_pre = self.left.preorder() if self.right is None: right_pre =  else: right_pre = self.right.preorder() return left_pre + + right_pre … 877 more words