comparison demo/refFun.ur @ 434:c471345f5165

Remove need for '() <-' notation
author Adam Chlipala <adamc@hcoop.net>
date Mon, 27 Oct 2008 08:27:45 -0400
parents 9119a5920106
children 20fab0e96217
comparison
equal deleted inserted replaced
433:659c17441250 434:c471345f5165
8 sequence s 8 sequence s
9 table t : { Id : int, Data : M.data } 9 table t : { Id : int, Data : M.data }
10 10
11 fun new d = 11 fun new d =
12 id <- nextval s; 12 id <- nextval s;
13 () <- dml (INSERT INTO t (Id, Data) VALUES ({id}, {d})); 13 dml (INSERT INTO t (Id, Data) VALUES ({id}, {d}));
14 return id 14 return id
15 15
16 fun read r = 16 fun read r =
17 o <- oneOrNoRows (SELECT t.Data FROM t WHERE t.Id = {r}); 17 o <- oneOrNoRows (SELECT t.Data FROM t WHERE t.Id = {r});
18 return (case o of 18 return (case o of