Monads
Warm-upHumanThe maybe monad on has , , and collapsing the two copies of . What is a -algebra ?
The maybe monad on has , , and collapsing the two copies of . What is a -algebra ?
How many algebra structures for the power-set monad are there on the three-element set ?
In the Kleisli category of the list monad, let and (both from to ). What is ?
Let with , unit and counit . The induced monad is on . What is its multiplication ?
In proving that is a right identity in the Kleisli category, we write, for ,
Which two facts justify the second and third equalities, in order?
For the list monad on , . Which argument shows that the Kleisli category is not equivalent to ?
Which forgetful functors to are monadic? (Choose all that apply.)
In the Lean file, a list algebra on X has act : List X → X. Which field states the associativity law ?
Write kleisli(f, g) returning the Kleisli composite (first f, then g) for the list monad: f and g are Python functions returning lists, and the composite applies g to every output of f and concatenates. Also write unit(x) returning [x]. The tests check the Kleisli category laws on examples.