[表示 : 全て 最新50 1-99 101- 201- 2chのread.cgiへ]
Update time : 05/09 13:36 / Filesize : 85 KB / Number-of Response : 282
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

純粋関数型言語Concurent Clean



39 名前:デフォルトの名無しさん mailto:sage [04/02/10 00:44]
>>1ではないのだが・・・
続き

getCsvData :: Int [Char] -> [Char]
getCsvData num [x:xs]    = getCsvData` num [x:xs]
where
    getCsvData` n [x:xs]
        | x == '\n'       = ['\n'] ++ getCsvData`     num xs
        | x == ','        = getCsvData`     (n-1) xs
        | n == 0          = [x] ++ getCsvData`     n   xs
        | otherwise        = getCsvData` n   xs
//    getCsvData`  0 [x:xs]   = [x] ++ getCsvData`     0   xs
     getCsvData` n []        = []

CharListWrite []    f = f
CharListWrite [c:cs] f = CharListWrite cs (fwritec c f)

CharFileCopy infile outfile = CharListWrite (CharListRead infile) outfile

CharListRead f
     | not readok = []
     | otherwise  = [char : CharListRead filepointer]
where
     (readok,char,filepointer) = sfreadc f
エラー処理は考えてません。
>>37はインデントがずれているので、適当に脳内補完しといてくれ。






[ 続きを読む ] / [ 携帯版 ]

全部読む 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧](*・∀・)<85KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef