From 3cf3e36b1498271f3c9162576809d886482e6d97 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Mon, 6 Apr 2015 19:37:51 +0800 Subject: 11 --- applicative/h11.hs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 applicative/h11.hs diff --git a/applicative/h11.hs b/applicative/h11.hs new file mode 100644 index 0000000..54eb02d --- /dev/null +++ b/applicative/h11.hs @@ -0,0 +1,6 @@ +-- http://stackoverflow.com/questions/23316255/lax-monoidal-functors-with-a-different-monoidal-structure +pure a = fmap (const a) unit +unit = pure () + +ff <*> fa = fmap (\(f,a) -> f a) $ ff ** fa +fa ** fb = pure (,) <*> fa <*> fb -- cgit v1.2.3-70-g09d2