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 | 4252 reads
|
Browse archives
Active forum topics |
Recent comments
32 weeks 6 days ago
33 weeks 48 min ago
33 weeks 54 min ago
1 year 3 weeks ago
1 year 7 weeks ago
1 year 8 weeks ago
1 year 8 weeks ago
1 year 11 weeks ago
1 year 16 weeks ago
1 year 16 weeks ago