fun length(as: []int): int = (shape as)[0]