fork(1) download
  1. type Point a = (a, a)
  2.  
  3. b :: [(a,a)] -> [(a,a)]
  4. b (x:xs) = xs ++ [x]
  5.  
  6. c :: (Floating a) => [Point a] -> [Point a]
  7. c (x:xs) = xs ++ [x]
  8.  
  9.  
  10. main = do
  11. print $ b [(1,2),(3,4)]
  12. print $ c [(1,2),(3,4)]
Success #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
[(3,4),(1,2)]
[(3.0,4.0),(1.0,2.0)]