Change fmap to (.)
This commit is contained in:
parent
26d7927c35
commit
8a4f83ec37
|
@ -95,4 +95,4 @@ neg = fold' (Lit . negate) Add (Mul . neg) -- Not efficient, but short :^)
|
|||
-- >>> eval (sub e2 e1)
|
||||
-- 51
|
||||
--
|
||||
sub = fmap (. neg) Add -- (a -> b) is a Functor
|
||||
sub = (. neg) . Add -- (a -> b) is a Functor
|
||||
|
|
Loading…
Reference in New Issue
Block a user