3 ms·
1) sure, but I figured I might as well implement all 4 operations for posterity. The `divideBy2` type would be not-that-dissimilar from the Even type. 2) Ha, if
by robbieo 7y ago
1) sure, but I figured I might as well implement all 4 operations for posterity. The `divideBy2` type would be not-that-dissimilar from the Even type.
2) Ha, if only! If that were true then we could prove all sorts of number-theoretic things by rewriting them in "types." Part of the point of this post is there is no magical power of types; they're just another programming language.
- SilasX 7y agoThanks for replying! 2) I didn't mean it would guarantee a proof, I just meant it would attempt a proof up to the limit of its type checker's ability to prove type validity.
- robbieo 7y agoAh, sure, you could use a mapped type – but given that the actual program starts failing around 3 I don't see a ton of utility.