fix. add missing guard function.

This commit is contained in:
Kei Hibino 2016-09-17 14:59:06 +09:00
parent 48ced4f2d6
commit 15e74b3987

View File

@ -44,7 +44,7 @@ $$\{ (p, b) | p \in P, b \in B, \pi_{P.name}(p) = \pi_{B.name}(b) \}$$
| p <- person, b <- birthday , P.name p == B.name b ]
-- List Comprehension
do { p <- person; b <- birthday; P.name p == B.name b
do { p <- person; b <- birthday; guard (P.name p == B.name b)
; return (p, b) } -- List Monad
~~~~~
@ -54,7 +54,7 @@ Intro / DSL using Haskell!
-----
~~~~~ {.haskell}
do { p <- person; b <- birthday; P.name p == B.name b
do { p <- person; b <- birthday; guard (P.name p == B.name b)
; return (p, b) } -- List Monad
~~~~~