Data.ListHaskell のリストの関数に対応する PHP 関数を調べてみた。まずは今回試した Haskell の関数の一覧。 >ghci Prelude> [1..5] ++ [6..10] [1,2,3,4,5,6,7,8,9,10] Prelude> head [1..5] 1 Prelude> last [1..5] 5 Prelude> tail [1..5] [2,3,4,5] Prelude> init [1..5] [1,2,3,4] Prelude> null [1..5] False Prelude> length [1..5] 5 Prelude> null [] True Prelude> :quit 言葉で説明すると ++ は2つのリストを連結し、head は先頭の要素の値、last は最後の要素の値、tail は先頭の要素以外のリスト、init は最後の