diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-01-17 10:03:26 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-01-17 10:03:26 +0100 |
commit | d569ae515606d45b931201cc464fd49b111cb3c9 (patch) | |
tree | 169517fc7af252933db87a15c1f8dc0ac9e6b700 /src/Hakyll | |
parent | b867e6f2042b64ba6ca2a3471bb12923f7d37456 (diff) | |
download | hakyll-d569ae515606d45b931201cc464fd49b111cb3c9.tar.gz |
Add utility mapA function
Diffstat (limited to 'src/Hakyll')
-rw-r--r-- | src/Hakyll/Core/Util/Arrow.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Hakyll/Core/Util/Arrow.hs b/src/Hakyll/Core/Util/Arrow.hs index 1896e11..d97ba22 100644 --- a/src/Hakyll/Core/Util/Arrow.hs +++ b/src/Hakyll/Core/Util/Arrow.hs @@ -4,6 +4,7 @@ module Hakyll.Core.Util.Arrow ( constA , sequenceA , unitA + , mapA ) where import Control.Arrow (Arrow, (&&&), arr, (>>^)) @@ -23,3 +24,8 @@ sequenceA = foldl reduce $ constA [] unitA :: Arrow a => a b () unitA = constA () + +mapA :: Arrow a + => (b -> c) + -> a [b] [c] +mapA = arr . map |