add coalesce
This commit is contained in:
parent
48f393a2d6
commit
4d0a87386e
7
coalesce.nix
Normal file
7
coalesce.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
with builtins;
|
||||||
|
let fn = y: vs:
|
||||||
|
if vs == [] then null else
|
||||||
|
if head vs != null then head vs else
|
||||||
|
y y (tail vs);
|
||||||
|
in
|
||||||
|
fn fn
|
Loading…
Reference in New Issue
Block a user