fork download
  1. a = [-3, 5, 3, -1, -6, -2]
  2.  
  3. prod = foldr (*) 1 (filter (\x -> x < 0) a)
  4.  
  5. len = length $ filter (\x -> x < 0) a
  6.  
  7. main = do
  8. print prod
  9. print len
  10.  
Success #stdin #stdout 0s 4596KB
stdin
Standard input is empty
stdout
36
4