3 ms·
Simple things can be done simply in Haskell too. It is straightforward to write an emulator without any monads, typeclasses and so forth. The reason the code h
by batterseapower 14y ago
Simple things can be done simply in Haskell too. It is straightforward to write an emulator without any monads, typeclasses and so forth.
The reason the code here looks so complex is that Jaspers implementation adds additional abstractions so he can use the type system to distinguish between DCPU computations that can are pure (except insofar as they access DCPU memory) and those that are impure (in that they communicate with the outside world by e.g. writing to the console).