datatype list t = Nil | Cons of t * list t table t : {Id : int, A : string} PRIMARY KEY Id fun allRows () = query (SELECT * FROM t) (fn r acc => return (Cons ((r.T.Id, r.T.A), acc))) Nil fun doBatch ls = case ls of Nil => return () | Cons ((id, a), ls') => dml (INSERT INTO t (Id, A) VALUES ({[id]}, {[a]})); doBatch ls' fun del id = dml (DELETE FROM t WHERE t.Id = {[id]}) fun show withDel lss = let fun show' ls = case ls of Nil => | Cons ((id, a), ls) => {[id]} {[a]} {if withDel then