diff options
Diffstat (limited to 'sucl/basic.icl')
-rw-r--r-- | sucl/basic.icl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sucl/basic.icl b/sucl/basic.icl index 1322f04..aa78e19 100644 --- a/sucl/basic.icl +++ b/sucl/basic.icl @@ -44,10 +44,10 @@ adjust a r f x // Claim a list of nodes from a heap claim :: ![.param] u:[.cell] -> ([.cell],v:[.cell]), [u<=v] -claim [] heap = ([],heap) <--- "basic.claim ends (with empty result)" +claim [] heap = ([],heap) claim [pnode:pnodes] [snode:heap] -= ([snode:snodes],heap`) <--- "basic.claim ends (with nonempty result)" - where (snodes,heap`) = (claim--->"basic.claim begins from basic.claim") pnodes heap += ([snode:snodes],heap`) + where (snodes,heap`) = claim pnodes heap claim pnodes emptyheap = abort "claim: out of heap" // Just in case. Should be used with an infinite heap. /* Depthfirst collects results of a function (called process), applied to a |