shared/tables.bend checks
raw source on the hub · import bend-lint-api@0.1.0.0/shared/tables.bend as Tables
1 import
import Base
Types
type Table source · line 5 · raw
@-A:Data -> Data
Values by number, from 0: a balanced tree. Each node parts its values by a bit of their number, the lowest first, so a lookup reads the bits of a number, and no text.
TLeaf@-A:Data -> @value:Maybe<&2, A> -> Table<A>
TNode@-A:Data -> @even:Table<A> -> @odd:Table<A> -> Table<A>
Definitions
def Table.get.go source · line 13 · raw
@-A:Data -> @t:Table<A> -> @+i:U32 -> @odd:Bool -> Maybe<&2, A>
The value numbered i in t: odd is whether i is.
def Table.get source · line 22 · raw
@-A:Data -> @t:Table<A> -> @+i:U32 -> Maybe<&2, A>
def Table.set.go source · line 27 · raw
@-A:Data -> @fuel:Nat -> @t:Table<A> -> @+i:U32 -> @x:A -> @odd:Bool -> @zero:Bool -> Table<A>
t with x numbered i: odd is whether i is, and zero whether it is 0. A leaf of another number parts
first. fuel bounds the levels: two a bit.
def Table.set source · line 70 · raw
@-A:Data -> @t:Table<A> -> @+i:U32 -> @x:A -> Table<A>