answer along with a count of the number of operations performed during
the calculation. That is, the desired behavior should be like this:
answer along with a count of the number of operations performed during
the calculation. That is, the desired behavior should be like this:
arithmetic operator (such as addition `( + )`, division `( / )`, or
multiplication `( * )`) to recieve objects from the counting monad as
arguments. The response of the interpreter says two things: that
arithmetic operator (such as addition `( + )`, division `( / )`, or
multiplication `( * )`) to recieve objects from the counting monad as
arguments. The response of the interpreter says two things: that
steps. By the way, that zero at the end provides the monadic object
with a starting point (0 relevant computations have occurred previous
to the current computation).
steps. By the way, that zero at the end provides the monadic object
with a starting point (0 relevant computations have occurred previous
to the current computation).
- You'll need to define a computation monad type, unit, bind, and lift.
+ You'll need to define a computation monad type, unit, bind, and lift2.
We encourage you to consider this hint: [[hints/Assignment 6 Hint 1]].
2. Prove that your monad satisfies the monad laws. First, give
We encourage you to consider this hint: [[hints/Assignment 6 Hint 1]].
2. Prove that your monad satisfies the monad laws. First, give