2007-06-28から1日間の記事一覧

S式計算機

30分プログラム、その68。超簡単S式計算機id:mzp:20070623:sexpの続き。 #load "camlp4o.cma";; (* parsing *) open Genlex;; let ($) f g = f g;; type s_exp = Num of int | Symbol of string | List of s_exp list | Proc of (s_exp list -> s_exp);; let…