aboutsummaryrefslogtreecommitdiff
path: root/test.txt
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-03-10 00:13:32 +0100
committertomsmeding <tom.smeding@gmail.com>2019-03-10 00:13:32 +0100
commit34d9f21c6ab529e415f38a5a886b1b612bcbd3bc (patch)
tree15a7f35385515b7bc65a3cc5c84249533e1c62c3 /test.txt
Initial
Diffstat (limited to 'test.txt')
-rw-r--r--test.txt10
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)
+};