Explorer

definy.source-part-find

description
The part id of the snapshot
type
Fn(parts: List<@definy.snapshot-check-source-part>, id: String, index: Number) -> Union{#none, #some(@definy.snapshot-check-source-part)}
expression
fn(parts$0, id$1, index$2) =>
  match @core.list-get(list: $0, index: $2) {
    #none(_) =>
      #none,
    #some(item$3) =>
      match @core.equal(left: $3.id, right: $1) {
        true =>
          #some($3),
        false =>
          @definy.source-part-find(parts: $0, id: $1, index: @core.plus(left: $2, right: 1))
      }
  }
visibility
public
definy.source-part-find (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: tYni_4FWjveRJEkQL8K7pDpgGUjOK0ySfyQ3Pxq19f4
content hash: zER0s-ED7OIzAPyczlS1HxO232dofaxZgXI2a2cEJNk