Explorer

definy.event-snapshots-replace

description
(en) snapshots with each snapshot that is also in full replaced by the one in full (same order)
type
Fn(commits: List<@definy.event-snapshot>, full: List<@definy.event-snapshot>) -> List<@definy.event-snapshot>
expression
fn(commits$0, full$1) =>
  @core.list-map(
    T: @definy.event-snapshot,
    U: @definy.event-snapshot,
    f: fn(item$2) =>
      match @definy.event-snapshot-find(commits: $1, event_hash: $2.event_hash, index: 0) {
        #some(found$3) =>
          $3,
        #none(_) =>
          $2
      },
    xs: $0
  )
visibility
public
definy.event-snapshots-replace (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: 2YN4dIr1LIzh8UrY_zWB8v_7HIfKg68-fI8HD-HbkzE
content hash: Et2VC231yZx6BydGPUEBOWxSkmdRPozWg3VYdvAaDIk