From 15ac1a816a9875591febcf678bbf914a11e5068f Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Tue, 30 Jun 2015 20:00:32 +0200 Subject: Add test case for operator hyperlinking. --- hypsrc-test/src/Operators.hs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 hypsrc-test/src/Operators.hs (limited to 'hypsrc-test') diff --git a/hypsrc-test/src/Operators.hs b/hypsrc-test/src/Operators.hs new file mode 100644 index 00000000..bc76c2d3 --- /dev/null +++ b/hypsrc-test/src/Operators.hs @@ -0,0 +1,18 @@ +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) -- cgit v1.2.3