Explorer

definy.stored-part-find

description
The part named name (module.name) in parts, from index
type
Fn(parts: List<@definy.stored-snapshot-part>, name: String, index: Number) -> Union{#none, #some(@definy.stored-snapshot-part)}
expression
fn(parts$0, name$1, index$3) =>
  match @core.list-get(list: $0, index: $3) {
    #none(_) =>
      #none,
    #some(part$4) =>
      match @core.equal(left: $4.name, right: $1) {
        true =>
          #some($4),
        false =>
          @definy.stored-part-find(parts: $0, name: $1, index: @core.plus(left: $3, right: 1))
      }
  }
visibility
public
definy.stored-part-find (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: oOl_nMGtcfs9fiqGxG-2Z8B3nLEApE4k2J7j7aj09YI
content hash: O0s-veDLgMFOfRS_ezehJ_XNt1rLGAgO5QIbfCFxhYs