ntracks = function(parent) -- memoize if parent.ntracks == nil then parent.ntracks = compute_ntracks(parent) end return parent.ntracks end