noritsuguの日記

2009-04-09``Algorithms'' (34) Exercise 2.5

Prelude> [1, 2, 3] ++ [4]
[1,2,3,4]
Prelude> 1:(2:(3:[4]))
[1,2,3,4]
Prelude> head [1, 2, 3]
1
Prelude> tail [1, 2, 3]
[2,3]
Prelude> drop 4 [1, 2, 3, 4, 5]
[5]
Prelude> [1, 2, 3, 4] !! 2
3
トラックバック - http://haskell.g.hatena.ne.jp/noritsugu/20090409