21 May
2005
21 May
'05
9:39 p.m.
On 2005 May 21 Saturday 17:52, wenduan wrote:
let n = read number
This converts type String to Integer.
return (number : rest)
This line is building up the list. Put 'n' on the list rather than 'number', so that the list will be numeric. Then when you try "list <- calculate", you can apply 'sum', etc.
sorry for those who feel its quite basic It is no problem. Beginners are welcome. If you have further questions, I recommend using the haskell-cafe mailing list, which is more appropriate for extended discussions.