fork(1) download
  1. f a=map(/sum a).foldr1(z(+)).z(map.(*))a
  2.  
  3. main = print $ [f [2,6,2,10] [[0,2],[3,4],[0,1],[1,1]],
  4. f [2,4,1] [[3,1],[0,0],[1,4]]]
Success #stdin #stdout 0s 4740KB
stdin
Standard input is empty
stdout
[[1.4,2.0],[1.0,0.8571428571428571]]