nix-dotfiles/lib/trivial.nix

7 lines
123 B
Nix
Raw Permalink Normal View History

{ stdlib }:
{
2022-03-07 16:01:52 +01:00
# a -> b -> Either (a b)
withDefault = default: value:
if (value == null) then default else value;
}