3 ms·
Actually, using a non-total function like last doesn't do your claims any favours. I'd have picked map as the canonical example for free theorems.
by eru 12y ago
Actually, using a non-total function like last doesn't do your claims any favours. I'd have picked map as the canonical example for free theorems.
- mightybyte 12y agoI chose that non-total function because it is easier to enumerate all the possible error cases than with the map function. And the error case is easily handled by the combination of incomplete pattern match and Safe Haskell. I was also trying to emphasize purity more than free theorems.