4 ms·
It's funny you pick that example since of natural numbers can be viewed as lists (jargon: they are both free monoids) with addition as concatenation: type
by Iceland_jack 10y ago
It's funny you pick that example since of natural numbers can be viewed as lists (jargon: they are both free monoids) with addition as concatenation:
type Natural = [()]
zero, one, two, three, four :: Natural
zero = []
one = [()]
two = [(), ()]
three = [(), (), ()]
four = [(), (), (), ()]
...
concatenation `(++) :: Natural -> Natural -> Natural`:
>>> four
[(), (), (), ()]
>>> three ++ one
[(), (), (), ()]
Your point still holds.
Our (non-jargon) vocabulary simply isn't equipped to deal with this level of abstraction so we need jargon if we intend to be fully descriptive — existing words don't cut it and we are just at the bottom rung of the abstraction ladder.
It's up to us as a community how much we care about faithfully describing things, Simon Peyton Jones himself claims tongue-in-cheek that their biggest mistake was not calling monads “warm fuzzy things”[0] :)
[0] http://research.microsoft.com/en-us/um/people/simonpj/papers/haskell-retrospective/HaskellRetrospective.pdf http://research.microsoft.com/en-us/um/people/simonpj/papers...