DEV Community

Sameer
Sameer

Posted on

Answer:

How to model this example

How could this be modelled with the Reader monad?

I'm not sure if this should be modelled with the Reader, yet it can be by:

  1. encoding the classes as functions which makes the code play nicer with Reader
  2. composing the functions with Reader in a…

Top comments (0)