In the purescript-free
package, there is a code example defining this interpreter:
teletypeN :: forall eff. NaturalTransformation TeletypeF (Eff (console :: CONSOLE | eff))
teletypeN (PutStrLn s a) = const a <$> log s
teletypeN (GetLine k) = pure (k "fake input")
How can I define and run another interpreter where the return type is Array Int
or State String Int
?