loading
open in
main.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
main = do
  print $ ([ ] >> [ ] :: [Int])
  print $ ([ ] >> [2] :: [Int])
  print $ ([1] >> [ ] :: [Int])
  print $ ([1] >> [2] :: [Int])

  print $ (Nothing >> Nothing :: Maybe Int)
  print $ (Nothing >> Just 2  :: Maybe Int)
  print $ (Just 1  >> Nothing :: Maybe Int)
  print $ (Just 1  >> Just 2  :: Maybe Int)

  print $ (Left  1 >> Left  2 :: Either Int Int)
  print $ (Left  1 >> Right 2 :: Either Int Int)
  print $ (Right 1 >> Left  2 :: Either Int Int)
  print $ (Right 1 >> Right 2 :: Either Int Int)
GHCi, version 8.6.3