プログラミング勉強ログ

プログラミングの勉強記録

2014-07-30から1日間の記事一覧

Yet Another Haskell 4章 (2)

4.2 Polymorphic Types 多相型関数tailはリストを引数にとるが、そのリストが内包する値の型に関わらず適用できる。 Prelude> tail [5,6,7,8,9] [6,7,8,9] Prelude> tail "hello" "ello" Prelude> tail ["the","man","is","happy"] ["man","is","happy"]これ…