{-# LANGUAGE Haskell2010 #-}
module Operators where


(+++) :: [a] -> [a] -> [a]
[a]
a +++ :: forall a. [a] -> [a] -> [a]
+++ [a]
b = [a]
a [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
++ [a]
b [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
++ [a]
a

($$$) :: [a] -> [a] -> [a]
[a]
a $$$ :: forall a. [a] -> [a] -> [a]
$$$ [a]
b = [a]
b [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
+++ [a]
a

(***) :: [a] -> [a] -> [a]
*** :: forall a. [a] -> [a] -> [a]
(***) [a]
a [] = [a]
a
(***) [a]
a (a
_:[a]
b) = [a]
a [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
+++ ([a]
a [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
*** [a]
b)

(*/\*) :: [[a]] -> [a] -> [a]
[[a]]
a */\* :: forall a. [[a]] -> [a] -> [a]
*/\* [a]
b = ([a] -> [a]) -> [[a]] -> [a]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap ([a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
*** [a]
b) [[a]]
a

(**/\**) :: [[a]] -> [[a]] -> [[a]]
[[a]]
a **/\** :: forall a. [[a]] -> [[a]] -> [[a]]
**/\** [[a]]
b = ([[a]] -> [a] -> [a]) -> [[[a]]] -> [[a]] -> [[a]]
forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith [[a]] -> [a] -> [a]
forall a. [[a]] -> [a] -> [a]
(*/\*) [[[a]]
a [[a]] -> [[a]] -> [[a]]
forall a. [a] -> [a] -> [a]
+++ [[a]]
b] ([[a]]
a [[a]] -> [[a]] -> [[a]]
forall a. [a] -> [a] -> [a]
$$$ [[a]]
b)


(#.#) :: a -> b -> (c -> (a, b))
a
a #.# :: forall a b c. a -> b -> c -> (a, b)
#.# b
b = (a, b) -> c -> (a, b)
forall a b. a -> b -> a
const ((a, b) -> c -> (a, b)) -> (a, b) -> c -> (a, b)
forall a b. (a -> b) -> a -> b
$ (a
a, b
b)