(a: Integer)..(b: Integer): Generator Integer == generate { while a <= b repeat { yield a; a := a + 1 } }
map(f: T -> T)(x: %): % == { xx := rep x; yy: Rep := new(dim); for i in a..b repeat set!(yy, i, f (xx.i)); per(yy); }
<< (port:BinaryReader):% == { p:% := 0; local e:E; local r:R; repeat { r := << port; e := << port; zero? r => break; p := add!(p, r, e); } p; }