OCAML
とりあえず2つのリストの和集合?をとる関数。 色々作った。以外にocamlと相性良いかも! let rec list_uniqufy(lst) = match lst with |[]->[] |hd::tl -> hd::(List.filter (fun x-> hd<>x) (list_uniqufy tl));; let list_union(lst1, lst2) = list_uniq…
open Xml type place = P of string let ps_to_xml (ps) = map (function (P p) -> p) ps;; とすると This pattern matches values of type place but is here used to match values of type Xml.xml と冷たく怒られる。なんでXML???