on master help sign in
Add utility mapA function
d569ae5Jasper Van der Jeugt
src/Hakyll/Core/Util/Arrow.hs+6
@@ -4,6 +4,7 @@ module Hakyll.Core.Util.Arrow
4 ( constA
4 ( constA
5 , sequenceA
5 , sequenceA
6 , unitA
6 , unitA
7+ , mapA
7 ) where
8 ) where
8
9
9import Control.Arrow (Arrow, (&&&), arr, (>>^))
10import Control.Arrow (Arrow, (&&&), arr, (>>^))
@@ -23,3 +24,8 @@ sequenceA = foldl reduce $ constA []
23unitA :: Arrow a
24unitA :: Arrow a
24 => a b ()
25 => a b ()
25unitA = constA ()
26unitA = constA ()
27+
28+mapA :: Arrow a
29+ => (b -> c)
30+ -> a [b] [c]
31+mapA = arr . map