cbor.entries-get
- description
- The value of the first entry with the key from index
- type
Fn(entries: List<@cbor.entry>, key: String, index: Number) -> Union{#none, #some(@cbor.item)}
- expression
fn(entries$0, key$1, index$2) => match @core.list-get(list: $0, index: $2) { #some(entry$3) => match @core.equal(left: @cbor.key-string(key: $3.key), right: $1) { true => #some($3.value), false => @cbor.entries-get(entries: $0, key: $1, index: @core.plus(left: $2, right: 1)) }, #none(_) => #none }
- visibility
- public
cbor.entries-get (project cbor, branch main, snapshot 5bvML2Im-osGmgnKJsp0FwmfSMONephnrgdWQboV3-E) id: 6BfI-c_oDT7sxa9R19cGDNwZFDmzlqdRuPOBRV5rgus content hash: Zkhzpqwz6EIZ93dSSnjovbrYu7HXZProjthdJwM5k5k