~/bend-docscommunity

context.bend checks

raw source on the hub · import 0x3db8fc3ab5ba012b34ead11a441dd57c/context.bend as Context

Paragraph-aware verse context (same-chapter; defaults maxBefore=3, maxAfter=3)

3 imports
import Base
import ./books.bend as Books
import ./para_data.bend as Para

Types

type PsSt source · line 28 · raw

Data

type FdPh source · line 105 · raw

Data

type FrPh source · line 184 · raw

Data

type Ctx source · line 216 · raw

Data

Definitions

def unmap_str source · line 6 · raw

@p:Pair(Map<&2, String>, String) -> String

def para_starts_str source · line 11 · raw

@+book:String -> @+ch:U32 -> String

def parse_u32_or0 source · line 21 · raw

@m:Maybe<&2, U32> -> U32

def parse_starts_go source · line 35 · raw

@fuel:Nat -> @st:PsSt -> @rest:String -> @+tok:String -> @acc:List<&2, U32> -> List<&2, U32>

def rev_u32 source · line 86 · raw

@xs:List<&2, U32> -> @acc:List<&2, U32> -> List<&2, U32>

def parse_starts source · line 93 · raw

@+s:String -> List<&2, U32>

def find_para_start source · line 109 · raw

@fuel:Nat -> @ph:FdPh -> @xs:List<&2, U32> -> @+v:U32 -> @best:U32 -> U32

def next_para_hit source · line 128 · raw

@+n:U32 -> @+found:U32 -> @zero:Bool -> U32

def next_para_after source · line 135 · raw

@fuel:Nat -> @ph:FdPh -> @xs:List<&2, U32> -> @+v:U32 -> @+found:U32 -> U32

def u32_max_go source · line 154 · raw

@+a:U32 -> @+b:U32 -> @le:Bool -> U32

def u32_max source · line 161 · raw

@+a:U32 -> @+b:U32 -> U32

def u32_min_go source · line 164 · raw

@+a:U32 -> @+b:U32 -> @le:Bool -> U32

def u32_min source · line 171 · raw

@+a:U32 -> @+b:U32 -> U32

def u32_sub_sat_go source · line 174 · raw

@+a:U32 -> @+b:U32 -> @ok:Bool -> U32

def u32_sub_sat source · line 181 · raw

@+a:U32 -> @+b:U32 -> U32

def fill_range_go source · line 188 · raw

@fuel:Nat -> @ph:FrPh -> @+cur:U32 -> @+hi:U32 -> @acc:List<&2, U32> -> List<&2, U32>

def fill_range_cons source · line 203 · raw

@fuel:Nat -> @+cur:U32 -> @+hi:U32 -> @acc:List<&2, U32> -> List<&2, U32>

def range_inclusive source · line 206 · raw

@+lo:U32 -> @+hi:U32 -> List<&2, U32>

def range_inclusive_go source · line 209 · raw

@+lo:U32 -> @+hi:U32 -> @empty:Bool -> List<&2, U32>

def para_hi_excl_go source · line 225 · raw

@+nxt:U32 -> @+ch_max:U32 -> @zero:Bool -> U32

def para_hi_excl source · line 232 · raw

@+nxt:U32 -> @+ch_max:U32 -> U32

def chapter_max_or source · line 235 · raw

@m:Maybe<&2, U32> -> U32

def mk_ctx source · line 242 · raw

@+book:String -> @+ch:U32 -> @+v:U32 -> @+para_lo:U32 -> @+para_hi_excl:U32 -> @+max_before:U32 -> @+max_after:U32 -> Ctx

def expand_verse source · line 270 · raw

@+book:String -> @+ch:U32 -> @+v:U32 -> @+max_before:U32 -> @+max_after:U32 -> Ctx

def expand_default source · line 290 · raw

@+book:String -> @+ch:U32 -> @+v:U32 -> Ctx

def show_u32_list source · line 293 · raw

@xs:List<&2, U32> -> @acc:String -> String

def format_ctx source · line 302 · raw

@c:Ctx -> String