2006-06-05から1日間の記事一覧

自分自身を出力するブログラム

ちょいと、今日話題になったので。出典は、「ハッカーのたのしみ(asin:4434046683)」。 main(a){printf(a,34,a="main(a){printf(a,34,a=%c,%s%c);}",34);} すばらしい。

宿題再び

let rec downto0 n = if n = 0 then [0] else n :: downto0 (n-1);; let rec zip list1 list2 = match list1,list2 with [],_ -> [] | _,[] -> [] | (x::xs),(y::ys) -> (x,y)::zip xs ys;; let sqrt_int x = int_of_float (sqrt (float_of_int x));; let sq…