2011-07-23から1日間の記事一覧
sum takes a list of numbers and returns their sum.product takes a list of numbers and returns their product. ghci> sum [5,2,1,6,3,2,5,7] 31 ghci> product [6,2,1,2] 24 ghci> product [1,2,5,6,7,9,2,0] 0 http://learnyouahaskell.com/starting-o…