blob: 8e86ab0b710ec09d3c5be708f6425c7f315175b9 (
plain) (
tree)
|
|
module Operators where
(+++) :: [a] -> [a] -> [a]
a +++ b = a ++ b ++ a
($$$) :: [a] -> [a] -> [a]
a $$$ b = b +++ a
(***) :: [a] -> [a] -> [a]
(***) a [] = a
(***) a (_:b) = a +++ (a *** b)
(*/\*) :: [[a]] -> [a] -> [a]
a */\* b = concatMap (*** b) a
(**/\**) :: [[a]] -> [[a]] -> [[a]]
a **/\** b = zipWith (*/\*) [a +++ b] (a $$$ b)
(#.#) :: a -> b -> (c -> (a, b))
a #.# b = const $ (a, b)
|