Add remaining haskell book exercises
This commit is contained in:
26
Haskell-book/17/Exercises/test/Spec.hs
Normal file
26
Haskell-book/17/Exercises/test/Spec.hs
Normal file
@@ -0,0 +1,26 @@
|
||||
import Data.Monoid
|
||||
import Exercises
|
||||
import Test.QuickCheck.Checkers
|
||||
import Test.QuickCheck.Classes
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
quickBatch $ functor $ Pair ('a', 'b', 'c') ('d', 'e', 'f')
|
||||
quickBatch $ applicative $ Pair ('a', 'b', 'c') ('d', 'e', 'f')
|
||||
quickBatch $ functor $ Two ('a', 'b', 'c') (1 :: Integer, 2 :: Integer, 3 :: Integer)
|
||||
quickBatch $ applicative $ Two (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
|
||||
quickBatch $ applicative $ Three (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
|
||||
(Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))
|
||||
quickBatch $ applicative $ Three' (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
|
||||
(Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))
|
||||
quickBatch $ applicative $ Four (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
|
||||
(Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))
|
||||
quickBatch $ applicative $ Four (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
|
||||
(Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))
|
||||
Reference in New Issue
Block a user