X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2F_assignment6.mdwn;fp=exercises%2F_assignment6.mdwn;h=b6a00dedd31771e23b6cfc49627b9ca4b87d8f28;hp=50e89ac84d80e7357c0c6d1c298fed12aecbc53c;hb=35de8baadf52a3f6488fbd0463cdc331a4ea02e3;hpb=b04c88ae4081976cc721ab9e9fb0b89bd5962942 diff --git a/exercises/_assignment6.mdwn b/exercises/_assignment6.mdwn index 50e89ac8..b6a00ded 100644 --- a/exercises/_assignment6.mdwn +++ b/exercises/_assignment6.mdwn @@ -134,8 +134,8 @@ piece, which we can think of as a function from a type to a type. Call this type function M, and let P, Q, R, and S be variables over types. Recall that a monad requires a singleton function 1:P-> MP, and a -composition operator >=>: (P->MQ) -> (Q->MR) -> (P->MR) [type type for -the composition operator corrects a "type"-o from the class handout] +composition operator >=>: (P->MQ) -> (Q->MR) -> (P->MR) [the type for +the composition operator given here corrects a "type"-o from the class handout] that obey the following laws: 1 >=> k = k @@ -170,7 +170,7 @@ Show your composition operator obeys the monad laws. 'a, let the boxed type be a list of objects of type 'a. The singleton is `\p.[p]`, and the composition operator is - >=> (first:P->[Q]) (second:Q->[R]) :(P->[R]) = fun p -> [r | q <- first p, r <- second q] + >=> (first:P->[Q]) (second:Q->[R]) :(P->[R]) = fun p -> [r | q <- first p, r <- second q] Sanity check: