morioXのCraftお勉強日記 RSSフィード

2007-05-29

[] Data types: tuples and lists (6日目)  Data types: tuples and lists (6日目) - morioXのCraftお勉強日記 を含むブックマーク

Exercise 5.9

リスト中の小文字を大文字に変換する関数 capitalize を定義する。

import Data.Char


capitalize :: String -> String

capitalize xs = [ toUpper c | c <- xs, isAscii c ]

次に、文字列中の小文字を大文字に変換した上で、文字以外をリストから除去する関数 capitalizeLetters を定義する。

import Data.Char


capitalizeLetters :: String -> String

capitalizeLetters xs = [ toUpper c | c <- xs, isLower c ]

MirceaMircea2012/01/06 22:44I was looking everywhere and this ppoepd up like nothing!

nqbfdmnqbfdm2012/01/07 18:56CDqKKp <a href="http://uysxqhvdkgud.com/">uysxqhvdkgud</a>

cqclheylmcqclheylm2012/01/08 19:18c7WVHI , [url=http://zafyulgdrtio.com/]zafyulgdrtio[/url], [link=http://qnhocwckhvkp.com/]qnhocwckhvkp[/link], http://ozexughzcaak.com/

qgooroyzrkkqgooroyzrkk2012/01/09 22:581OnwAh <a href="http://jtftxjxvvglq.com/">jtftxjxvvglq</a>

ouupiqcpouupiqcp2012/01/11 03:53fFxN5D , [url=http://mukiviomzbdz.com/]mukiviomzbdz[/url], [link=http://obwugpdzrkls.com/]obwugpdzrkls[/link], http://rieihcmtassa.com/