diff options
Diffstat (limited to 'alleq.hs')
-rw-r--r-- | alleq.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/alleq.hs b/alleq.hs new file mode 100644 index 0000000..7080614 --- /dev/null +++ b/alleq.hs @@ -0,0 +1,6 @@ +alleq :: Eq a => [a] -> Maybe a -> Bool +alleq [] _ = True +alleq (h:t) Nothing = alleq t (Just h) +alleq (h:t) (Just e) + | h == e = alleq t (Just e) + | True = False |