add wam_instructions/2 to render predicate instructions as lists of functors

This commit is contained in:
Mark Thom
2019-09-22 16:06:50 -06:00
parent 4cfab7aff8
commit 380aae85bd
12 changed files with 594 additions and 24 deletions

View File

@@ -74,6 +74,12 @@ impl Heap {
self.push(HeapCellValue::Addr(Addr::Con(Constant::EmptyList)));
head_addr
}
pub fn extend<Iter: Iterator<Item=HeapCellValue>>(&mut self, iter: Iter) {
for hcv in iter {
self.push(hcv);
}
}
}
impl Index<usize> for Heap {