nix-dotfiles/overlays/lib/trivial.nix

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;
}