dhall-nix-lib/Function/extends.dhall

14 lines
387 B
Text
Raw Normal View History

2022-09-09 07:23:27 +00:00
λ(nix : ../NixPrelude.dhall) →
let Set = ../Set/Type.dhall
let Set/mergeAttrs = ../Set/mergeAttrs.dhall nix
let extends
: (Set → Set → Set) → (Set → Set) → Set → Set
= λ(f : Set → Set → Set) →
λ(rattrs : Set → Set) →
λ(self : Set) →
let super = rattrs self in Set/mergeAttrs super (f super self)
in extends