[Haskell-cafe] how to calculate the sum of list of lists?
ndmitchell at gmail.com
Mon Feb 5 11:59:38 EST 2007
> How to calculate the sum of list of lists in Haskell?
What do you mean by this? What is the value of a list?
If you mean sum the numbers such that [[1,2],[3,4]] = 1+2+3+4 then you
are able to ask two alternative questions - how do i convert a list of
lists to a list, and how do i sum a list.
Both can be answered by Hoogle:
The list of lists to a list is a bit easier so I'll leave you to solve
that one :)
More information about the Haskell-Cafe