diff options
Diffstat (limited to 'test.txt')
-rw-r--r-- | test.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..88001e4 --- /dev/null +++ b/test.txt @@ -0,0 +1,10 @@ +fmap f p = Parser ((.) (fmapEither (fmap1st f)) (runParser p)); + +fmapEither f e = case e of { + Left x -> Left x; + Right x -> Right (f x) +}; + +fmap1st f p = case p of { + (l, r) -> (f l, r) +}; |