2007-07-13から1日間の記事一覧

1文字の二項演算子で空いているもの

% cat >t.hs main = putStr $ unlines [":t ("++[c]++")"|c<-['!'..'~']] % runghc t.hs | head 1 :t (!) % runghc t.hs | ghci 2>&1 | grep 'scope: `[^A-Za-z]' <interactive>:1:0: Not in scope: `!' <interactive>:1:0: Not in scope: `#' <interactive>:1:0: Not in scope: `%' <interactive>:1:0: Not in sc</interactive></interactive></interactive></interactive>…

Bx=S(Kx)

S(Kx)yz = Kxz(yz) = x(yz)なので、 BxとしているところはS(Kx)とできる。よって、Dの場合なら、 D = BB = S(KB)また、addの場合なら、 add = BSD = BS(BB) = S(KS)(S(KB))iで書き直すと add = i(i(i(i(i))))(i(i(i(i)))(i(i(i(i(i))))))(i(i(i(i(i))))(i(i(…