From 64b491345e80cf0df8c46255893a71b9783dd1a9 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sun, 25 Sep 2016 17:08:40 +0900 Subject: [PATCH] Rephrase in terms of Applicative primitives. --- src/Algorithm.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Algorithm.hs b/src/Algorithm.hs index dde80797e..552e0aff2 100644 --- a/src/Algorithm.hs +++ b/src/Algorithm.hs @@ -24,7 +24,7 @@ type Algorithm term diff = Ap (AlgorithmF term diff) iterAp :: Functor g => (g a -> a) -> Ap g a -> a iterAp algebra = go where go (Pure a) = a - go (Ap wrapped apply) = algebra (go . (<$> apply) . (&) <$> wrapped) + go (Ap wrapped apply) = algebra (go . (apply <*>) . pure <$> wrapped) -- DSL