| ▲ | roryc89 4 hours ago | |
In most FP languages it is simple to print to screen and get a random number. Pure functions often exist in practice and are useful for preventing many bugs. Sure, they may not be suitable for some situations but they can prevent a lot of foot guns. Here's a Haskell example with all of the above: | ||