3 ms·
I wrote an example with prime numbers that you can run in the Haskell playground: https://play.haskell.org/saved/gRsNcCGo https://play.haskell.org/saved/gRsNcC
by ParetoOptimal 4y ago
I wrote an example with prime numbers that you can run in the Haskell playground:
https://play.haskell.org/saved/gRsNcCGo https://play.haskell.org/saved/gRsNcCGo
> They are useless if you want to ensure that a given number is a prime number.
This is wrong. In the example above `addPrimes` will only take prime numbers.
As such if I make a Jira story that says "add multiply/subtract functions using the PrimeNumber type" I'll know that implementation is simplified by only being able to concern itself with prime numbers.