fork download
  1. import Data.List
  2.  
  3. tests = [
  4. [-1,0,10,237,-316],
  5. [1,2,3,4,5,234,7897234],
  6. [89,234,-3,0,16]
  7. ]
  8.  
  9. main = print $ map (length . filter (< 0)) $ filter (elem 0) tests
Success #stdin #stdout 0s 6220KB
stdin
Standard input is empty
stdout
[2,1]