X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2Fassignment7.mdwn;h=37a84c0c61a799b145065f1473772565e28fa8a7;hp=22152fe3cb044c7e4bedebddaedfb5276741c563;hb=28c12de567214f348853ddb23e1a0bb23676c5f9;hpb=dbac2255c48ea7f08f9f7f53b2f78d4f17f56a33 diff --git a/exercises/assignment7.mdwn b/exercises/assignment7.mdwn index 22152fe3..37a84c0c 100644 --- a/exercises/assignment7.mdwn +++ b/exercises/assignment7.mdwn @@ -76,7 +76,7 @@ as a function from a type to a type. Call this type function M, and let P, Q, R, Recall that a monad requires a singleton function `mid : P-> MP`, and a composition operator `>=> : (P->MQ) -> (Q->MR) -> (P->MR)`. The type for the composition operator stated here corrects a typo in the class handout. -Also, in the handout we called `mid` 1. But now we've decided that `mid` +Also, in the handout we called `mid` `𝟭`. But now we've decided that `mid` is better. (Think of it as "m" plus "identity", not as the start of "midway".) We will also move freely back and forth between using `>=>` and using `<=<` (aka `mcomp`), which @@ -112,7 +112,7 @@ More specifically, (If you have trouble keeping straight what is the OCaml terminology for this and what is the Haskell terminology, don't worry, we do too.) -Now the obvious singleton for the Option monad is `\p. Just p`. Give +Now the obvious singleton for the Option monad is `\p. Some p`. Give (or reconstruct) either of the composition operators `>=>` or `<=<`. Show that your composition operator obeys the Monad Laws.