August 2018
Intermediate to advanced
380 pages
10h 2m
English
The first benefit Cats has is referential transparency. In the preceding example, the computation to print hello world to the command line will not be evaluated right away. It is side effecting, and the fact that we do not evaluate it right away means it is referentially transparent. You can evaluate the computation as follows:
(hello *> world).unsafeRunSync
IO has a bunch of methods, the names of which are prepended with the unsafe word.
Unsafe methods are generally what their prefix says, unsafe. This means that they may block, produce side effects, throw exceptions, and do other things that may cause you a headache. Following the description of the IO type in the documentation itself, you should only call such ...