大久保弘崇
ex9
最終更新:
hirotakaohkubo
-
view
9.1
instance Value Int where
encode k = Int k
decode (Int k) = k
instance Value a => Value [a] where
encode = foldr (Cons . encode) Nil
decode Nil = []
decode (Cons x xs) = decode x : decode xs
9.2
差分リストのオンラインで読める説明としては http://www.geocities.jp/m_hiroi/prolog/prolog04.html がある。ただし若干のPrologの知識を必要とする。