src/containers/dlist_iterator.bend checks
raw source on the hub · import 0xe4067e0d858024083f36a7abe7281e89/src/containers/dlist_iterator.bend as Dlist_iterator
5 imports
import Base import ./doubly_linked_list.bend as D import ./internal/dlist_storage.bend as R import ./types/doubly_linked_list.bend as E import ./types/internal_dlist.bend as H
Types
type Error source · line 16 · raw
Data
Owning, bidirectional gap cursor. The list cannot be used independently until finish() returns it. last is cleared by add/remove, retained by set and seeks.
ExhaustedError
NoCurrentError
Storage@error:0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error -> Error
type Iterator source · line 21 · raw
@-T:Data -> Type
IT@-T:Data -> @list:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> @next:U32 -> @last:U32 -> @forward:Bool -> @index:Nat -> Iterator<T>
type Move source · line 97 · raw
@-T:Data -> Data
M@-T:Data -> @next:U32 -> @last:U32 -> @forward:Bool -> @index:Nat -> @result:Result<&2, &2, Error, T> -> Move<T>
type Forward source · line 118 · raw
@-T:Data -> Type
F@-T:Data -> @vals:Array<Maybe<&2, T>> -> @nexts:Array<U32> -> @after:U32 -> @value:Result<&2, &2, Error, T> -> Forward<T>
Definitions
def choose source · line 7 · raw
@-A:Data -> @b:Bool -> @x:A -> @y:A -> A
def present source · line 50 · raw
@h:U32 -> Bool
def gap_left source · line 77 · raw
@prevs:Array<U32> -> @tail:U32 -> @n:U32 -> @empty:Bool -> Pair(Array<U32>, U32)
def add_meta source · line 193 · raw
@n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @r:Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Handle> -> Move<Unit>
Templates
template endpoint source · line 27 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> @+front:Bool -> Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, U32)
Cursor links are arena indices plus one; zero is the gap past the end. Only this owning iterator can mutate the list until finish. Public handles retain their owner and generation; a cursor is never exposed as a handle.
template first_result source · line 32 · raw
@-T:Data -> @r:Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, U32) -> Iterator<T>
template iter_first source · line 36 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> Iterator<T>
template last_result source · line 39 · raw
@-T:Data -> @r:Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Nat) -> Iterator<T>
template iter_last source · line 43 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> Iterator<T>
template finish source · line 46 · raw
@-T:Data -> @it:Iterator<T> -> 0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>
template has_next source · line 53 · raw
@-T:Data -> @it:Iterator<T> -> Pair(Iterator<T>, Bool)
template has_previous source · line 57 · raw
@-T:Data -> @it:Iterator<T> -> Pair(Iterator<T>, Bool)
template position source · line 61 · raw
@-T:Data -> @it:Iterator<T> -> Pair(Iterator<T>, Nat)
template cursor_set source · line 65 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> @link:U32 -> @x:T -> Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, Unit>)
template cursor_remove_gen source · line 69 · raw
@-T:Data -> @+tag:U32 -> @depth:Nat -> @cap:U32 -> @raw:0xe4067e0d858024083f36a7abe7281e89/src/containers/internal/dlist_storage.DList<T> -> @+id:U32 -> @r:Pair(Array<U32>, U32) -> Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, T>)
template cursor_remove source · line 73 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> @+link:U32 -> Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, T>)
template insert_gap_result source · line 84 · raw
@-T:Data -> @r:Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Handle) -> Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Handle>)
template insert_gap source · line 88 · raw
@-T:Data -> @tag:U32 -> @depth:Nat -> @cap:U32 -> @gens:Array<U32> -> @owner:U32 -> @fresh:U32 -> @free:U32 -> @count:Nat -> @head:U32 -> @tail:U32 -> @rd:Nat -> @rc:U32 -> @vals:Array<Maybe<&2, T>> -> @nexts:Array<U32> -> @n:U32 -> @x:T -> @r:Pair(Array<U32>, U32) -> Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Handle>)
template cursor_insert_gap source · line 93 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> @+n:U32 -> @x:T -> Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Handle>)
n is a live cursor link, or zero for the gap following the tail.
template move_meta source · line 100 · raw
@-T:Data -> @n:U32 -> @last:U32 -> @f:Bool -> @+i:Nat -> @h:U32 -> @next:U32 -> @+forward:Bool -> @r:Result<&2, &2, Error, T> -> Move<T>
template attach_move source · line 107 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> @m:Move<T> -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template storage_result source · line 111 · raw
@-T:Data -> @r:Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, T> -> Result<&2, &2, Error, T>
template forward_link source · line 121 · raw
@-T:Data -> @vals:Array<Maybe<&2, T>> -> @value:Maybe<&2, T> -> @r:Pair(Array<U32>, U32) -> Forward<T>
template forward_value source · line 125 · raw
@-T:Data -> @nexts:Array<U32> -> @n:U32 -> @r:Pair(Array<Maybe<&2, T>>, Maybe<&2, T>) -> Forward<T>
template forward_arrays source · line 129 · raw
@-T:Data -> @vals:Array<Maybe<&2, T>> -> @nexts:Array<U32> -> @+n:U32 -> @empty:Bool -> Forward<T>
template forward_finish source · line 136 · raw
@-T:Data -> @tag:U32 -> @depth:Nat -> @cap:U32 -> @gens:Array<U32> -> @owner:U32 -> @fresh:U32 -> @free:U32 -> @count:Nat -> @head:U32 -> @tail:U32 -> @rd:Nat -> @rc:U32 -> @prevs:Array<U32> -> @+n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @r:Forward<T> -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template next_checked source · line 140 · raw
@-T:Data -> @it:Iterator<T> -> @empty:Bool -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template next source · line 144 · raw
@-T:Data -> @it:Iterator<T> -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template backward_value_result source · line 148 · raw
@-T:Data -> @r:Pair(Array<Maybe<&2, T>>, Maybe<&2, T>) -> Pair(Array<Maybe<&2, T>>, Result<&2, &2, Error, T>)
template backward_value source · line 152 · raw
@-T:Data -> @vals:Array<Maybe<&2, T>> -> @h:U32 -> @empty:Bool -> Pair(Array<Maybe<&2, T>>, Result<&2, &2, Error, T>)
template backward_finish source · line 159 · raw
@-T:Data -> @tag:U32 -> @depth:Nat -> @cap:U32 -> @gens:Array<U32> -> @owner:U32 -> @fresh:U32 -> @free:U32 -> @count:Nat -> @head:U32 -> @tail:U32 -> @rd:Nat -> @rc:U32 -> @prevs:Array<U32> -> @nexts:Array<U32> -> @n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @+h:U32 -> @r:Pair(Array<Maybe<&2, T>>, Result<&2, &2, Error, T>) -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template previous_found source · line 163 · raw
@-T:Data -> @n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @r:Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, U32) -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template previous_target source · line 167 · raw
@-T:Data -> @tag:U32 -> @depth:Nat -> @cap:U32 -> @gens:Array<U32> -> @owner:U32 -> @fresh:U32 -> @free:U32 -> @count:Nat -> @head:U32 -> @tail:U32 -> @rd:Nat -> @rc:U32 -> @vals:Array<Maybe<&2, T>> -> @nexts:Array<U32> -> @n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @r:Pair(Array<U32>, U32) -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template previous_checked source · line 171 · raw
@-T:Data -> @it:Iterator<T> -> @empty:Bool -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template previous source · line 175 · raw
@-T:Data -> @it:Iterator<T> -> Pair(Iterator<T>, Result<&2, &2, Error, T>)
template set_result source · line 179 · raw
@-T:Data -> @n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @r:Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, Unit>) -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template set_checked source · line 186 · raw
@-T:Data -> @it:Iterator<T> -> @x:T -> @empty:Bool -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template attach_unit source · line 200 · raw
@-T:Data -> @s:0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T> -> @m:Move<Unit> -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template added source · line 204 · raw
@-T:Data -> @n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @r:Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Handle>) -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template add source · line 208 · raw
@-T:Data -> @it:Iterator<T> -> @x:T -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template remove_meta source · line 212 · raw
@-T:Data -> @n:U32 -> @last:U32 -> @+f:Bool -> @+i:Nat -> @after:U32 -> @r:Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, T> -> Move<Unit>
template removed source · line 219 · raw
@-T:Data -> @n:U32 -> @last:U32 -> @f:Bool -> @i:Nat -> @after:U32 -> @r:Pair(0xe4067e0d858024083f36a7abe7281e89/src/containers/doubly_linked_list.DList<T>, Result<&2, &2, 0xe4067e0d858024083f36a7abe7281e89/src/containers/types/doubly_linked_list.Error, T>) -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template remove_target source · line 223 · raw
@-T:Data -> @tag:U32 -> @depth:Nat -> @cap:U32 -> @gens:Array<U32> -> @owner:U32 -> @fresh:U32 -> @free:U32 -> @count:Nat -> @head:U32 -> @tail:U32 -> @rd:Nat -> @rc:U32 -> @vals:Array<Maybe<&2, T>> -> @prevs:Array<U32> -> @n:U32 -> @+h:U32 -> @f:Bool -> @i:Nat -> @r:Pair(Array<U32>, U32) -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template remove_checked source · line 227 · raw
@-T:Data -> @it:Iterator<T> -> @empty:Bool -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template set source · line 234 · raw
@-T:Data -> @it:Iterator<T> -> @x:T -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)
template remove source · line 238 · raw
@-T:Data -> @it:Iterator<T> -> Pair(Iterator<T>, Result<&2, &2, Error, Unit>)