yjtools 0.1 → 0.2
raw patch · 5 files changed
+32/−2 lines, 5 files
Files
- Control/Applicative/Utils.hs +7/−0
- Data/Function/Tools.hs +6/−0
- Data/List/Tools.hs +7/−0
- Data/Tuple/Tools.hs +10/−0
- yjtools.cabal +2/−2
+ Control/Applicative/Utils.hs view
@@ -0,0 +1,7 @@+module Control.Applicative.Utils (+ (<.>)+) where++infixr 9 <.>+(<.>) :: Functor f => (a -> b) -> (c -> f a) -> c -> f b+f1 <.> f2 = fmap f1 . f2
+ Data/Function/Tools.hs view
@@ -0,0 +1,6 @@+module Data.Function.Tools (+ const2+) where++const2 :: a -> b -> c -> a+const2 = const . const
+ Data/List/Tools.hs view
@@ -0,0 +1,7 @@+module Data.List.Tools (+ mulLists+) where++mulLists :: [[a]] -> [[a]]+mulLists [] = [[]]+mulLists (xs:xss) = [ x:xs_ | x <- xs, xs_ <- mulLists xss ]
+ Data/Tuple/Tools.hs view
@@ -0,0 +1,10 @@+module Data.Tuple.Tools (+ modifyFst+, modifySnd+) where++modifyFst :: (a -> b) -> (a, c) -> (b, c)+modifyFst f (x, y) = (f x, y)++modifySnd :: (a -> b) -> (c, a) -> (c, b)+modifySnd f (x, y) = (x, f y)
yjtools.cabal view
@@ -1,5 +1,5 @@ Name: yjtools-Version: 0.1+Version: 0.2 Cabal-Version: >= 1.2 Build-Type: Simple License: GPL@@ -19,4 +19,4 @@ Library Build-Depends: base- Exposed-Modules: Control.Monad.Utils+ Exposed-Modules: Control.Monad.Utils, Control.Applicative.Utils, Data.List.Tools, Data.Tuple.Tools, Data.Function.Tools