dotfiles/nixpkgs/overlays/lib/trivial.nix
2021-12-23 04:34:47 +01:00

8 lines
151 B
Nix

final: prev:
let
in prev.lib.trivial // {
# a -> b -> Either (a b)
withDefault = default: value:
if (value == null) then default else value;
}