Nonoblock: Difference between revisions

Content added Content deleted
(Add an algorithm.)
(Updated D entry)
Line 77: Line 77:
if (result) return result;
if (result) return result;
} else {
} else {
enforce(sum(cast(uint[])blocks) + blocks.length - 1 <= cells,//**
enforce(blocks.sum + blocks.length - 1 <= cells,
"Those blocks cannot fit in those cells.");
"Those blocks cannot fit in those cells.");
immutable firstBl = blocks[0];
immutable firstBl = blocks[0];