summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2011-01-01 20:59:47 +0000
committerAlberto Ruiz <aruiz@um.es>2011-01-01 20:59:47 +0000
commit9fc924dc107cd619c60a421d288dafb92f417b8c (patch)
treea18d7d69434415eb28caddaf4fba238f74b04360 /examples
parent2b5ea5fdbf68b8c125a9a256aa15a6de849cdbca (diff)
accum
Diffstat (limited to 'examples')
-rw-r--r--examples/bool.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/bool.hs b/examples/bool.hs
index 9301689..278e9f2 100644
--- a/examples/bool.hs
+++ b/examples/bool.hs
@@ -40,6 +40,7 @@ q = row [0,1,0,1]
40main = do 40main = do
41 print $ find (>6) m 41 print $ find (>6) m
42 disp $ assoc (6,8) 7 $ zip (find (/=0) (eye 5)) [10..] 42 disp $ assoc (6,8) 7 $ zip (find (/=0) (eye 5)) [10..]
43 disp $ accum (eye 5) (+) [((0,2),3), ((3,1),7), ((1,1),1)]
43 disp $ m .>=. 10 .||. m .<. 4 44 disp $ m .>=. 10 .||. m .<. 4
44 (disp . fromColumns . map flatten) [p, q, p.&&.q, p .||.q, p `xor` q, p `equiv` q, p `imp` q] 45 (disp . fromColumns . map flatten) [p, q, p.&&.q, p .||.q, p `xor` q, p `equiv` q, p `imp` q]
45 print $ taut $ (p `imp` q ) `equiv` (no q `imp` no p) 46 print $ taut $ (p `imp` q ) `equiv` (no q `imp` no p)