IntrusiveList.clear_loop: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/internal/intrusive_list.bend as IntrusiveList Lines 332-338 of bend-collections@1.0.0.0/src/containers/internal/intrusive_list.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/internal/intrusive_list.bend&start_line=332&end_line=338 import Base import bend-collections@1.0.0.0/src/containers/types/intrusive_doubly_linked_list.bend as E def clear_loop(~S: Type, ~N: Data, ~C: Data, ~next: S -> N -> S & Maybe<&2, N>, ~set_next: S -> N -> Maybe<&2, N> -> S, ~set_prev: S -> N -> Maybe<&2, N> -> S, ~post_remove: S -> C -> N -> S, +fuel: Nat, +head: N, +c: C, r: S & Maybe<&2, N>) -> S & Result<&2, &1, E.Error, Unit>: match fuel r: case 0n Tuple{s, cursor}: (s, Fail{E.LimitExceeded{}}) case 1n+p Tuple{s, None{}}: (post_remove(set_next(s, head, None{}), c, head), Done{Unit{}}) case 1n+p Tuple{s, Some{node}}: clear_loop(~S, ~N, ~C, ~next, ~set_next, ~set_prev, ~post_remove, p, head, c, clear_step(~S, ~N, ~C, ~next, ~set_next, ~set_prev, ~post_remove, s, node, c)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/internal/intrusive_list.bend&name=clear_step https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/types/intrusive_doubly_linked_list.bend&name=Error