nix-dotfiles/lib/trivial.nix

7 lines
123 B
Nix

{ stdlib }:
{
# a -> b -> Either (a b)
withDefault = default: value:
if (value == null) then default else value;
}