Explorer

core.compile-find-part

description
The part with the id as a one-element list, or an empty list, from the index of the parts (ctx.part_index, made by core.compile-to-wasm with list_hash_index). The ids are unique. index is not used (kept for the callers, which pass 0)
type
Fn(
  parts: List<List<Record{id: String, expression: @core.expression, base: Number}>>,
  id: String,
  index: Number
) -> List<Record{id: String, expression: @core.expression, base: Number}>
expression
fn(parts$0, id$1, index$2) =>
  match @core.list-hash-index-find(index: $0, field: "id", value: $1) {
    #none(_) =>
      [],
    #some(part$3) =>
      [$3]
  }
visibility
public
core.compile-find-part (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc)
id: 01EhxusETzDVZuLsyreYTtDIriBeAgI-lfgGLQnxelY
content hash: S64_dJZ3ad0QHX59uyfXKjZrR0Y7WJQJY76piKBmvNU