User loginNavigation |
very simple haskell questionI am just starting Haskell and trying to write an alternative function for returning the last element of a list by using the !! function. I have tried... mylast xs = xs !! (length [xs] - 1) but this always returns the head of the list. What am I doing wrong? I did say it was very simple... By Chad950 at 2009-07-28 17:04 | LtU Forum | previous forum topic | next forum topic | other blogs | 4514 reads
|
Browse archivesActive forum topics |
Recent comments
5 days 14 hours ago
1 week 2 days ago
6 weeks 3 days ago
6 weeks 4 days ago
18 weeks 4 days ago
18 weeks 5 days ago
18 weeks 6 days ago
18 weeks 6 days ago
19 weeks 4 days ago
19 weeks 4 days ago