Skip to content

Instantly share code, notes, and snippets.

View martincohen's full-sized avatar

Martin Cohen martincohen

View GitHub Profile
typedef T = int;
var segs: T**;
var seg: T*;
var segcap = 1;
var segidx = 1;
func grow() {
seg = 0;
asetcap(seg, segcap);
apush(segs, seg);