Explorer

definy.merge-hash-of

description
The content hash of the part module.name in parts (none if there is no such part)
type
Fn(parts: List<@definy.merge-flat-part>, module: String, name: String) -> Union{#none, #some(String)}
expression
fn(parts$0, module$1, name$2) =>
  @core.list-fold(
    T: @definy.merge-flat-part,
    A: Union{#none, #some(String)},
    reducer: fn(acc$3, item$4) =>
      match @core.and(left: @core.equal(left: $4.module, right: $1), right: @core.equal(left: $4.name, right: $2)) {
        true =>
          #some($4.content_hash),
        false =>
          $3
      },
    init: #none,
    xs: $0
  )
visibility
public
definy.merge-hash-of (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: RQB_bkqGngGSafQlt9tWDzWkj21SstOhIq2QszcJTyY
content hash: pkcjExw1KGU1K8LS6jAkBVrYD02iuCRB_IAvID3EVK4