def be

bend-kit-time@0.3.0.0 · time.bend:613

import bend-kit-time@0.3.0.0/time.bend as Time
import Base

613# n bytes of a byte string, big-endian.
614def be(n: Nat, s: String, +acc: U32) -> U32:
615  match n:
616    case 0n:
617      acc
618    case 1n+k:
619      match s:
620        case SNil{}:
621          acc
622        case SCon{Chr{c}, t}:
623          be(k, t, ((acc << 8n) .|. c : U32))

Uses (6)

Used by (2)