Explorer

definy.snapshot-check-part-find

description
The part whose ID is id from index (start with index 0)
type
Fn(parts: List<@definy.snapshot-check-part>, id: String, index: Number) -> Union{#none, #some(@definy.snapshot-check-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.snapshot-check-part-find(parts: $0, id: $1, index: @core.plus(left: $2, right: 1))
      }
  }
visibility
public
definy.snapshot-check-part-find (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: nbnatFpMR6CIv_Dx48qBQeRC2YwBwR7t1B40nDrp7w8
content hash: WGUy-3Q4wTd670A-9or_7dpuUZJzypAYXL5d6cFBNsw