fork(2) download
  1. zipper x y = (sqrt x + sqrt y, x, y)
  2.  
  3. predicateA (z,_,_) = z > 9 && z < 99
  4. a = filter predicateA $ zipWith zipper [1..] [1..]
  5.  
  6. predicateBDrop (z,_,_) = z <= 9
  7. predicateBTake (z,_,_) = z < 99
  8. b = takeWhile predicateBTake $ dropWhile predicateBDrop $ zipWith zipper [1..] [1..]
  9.  
  10. last2 [] = []
  11. last2 [x] = [x]
  12. last2 [x, y] = [x,y]
  13. last2 (x:xs) = last2 xs
  14.  
  15. main = do
  16. putStrLn ".."
  17. mapM_ print $ last2 b
  18.  
Success #stdin #stdout 0s 8388607KB
stdin
Standard input is empty
stdout
(9.16515138991168,21.0,21.0)
(9.38083151964686,22.0,22.0)
..
(98.97474425326898,2449.0,2449.0)
(98.99494936611666,2450.0,2450.0)