2011-07-13 12:19:57 +00:00
|
|
|
with import ./lib.nix;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
as = { x.y.z = 123; a.b.c = 456; };
|
|
|
|
|
2012-09-27 19:43:08 +00:00
|
|
|
bs = { f-o-o.bar = "foo"; };
|
2011-07-13 12:19:57 +00:00
|
|
|
|
|
|
|
or = x: y: x || y;
|
|
|
|
|
|
|
|
in
|
|
|
|
[ as.x.y.z
|
|
|
|
as.foo or "foo"
|
|
|
|
as.x.y.bla or as.a.b.c
|
|
|
|
as.a.b.c or as.x.y.z
|
2012-09-27 19:43:08 +00:00
|
|
|
as.x.y.bla or bs.f-o-o.bar or "xyzzy"
|
2011-07-13 12:19:57 +00:00
|
|
|
as.x.y.bla or bs.bar.foo or "xyzzy"
|
2016-02-15 13:32:37 +00:00
|
|
|
(123).bla or null.foo or "xyzzy"
|
2011-07-13 12:19:57 +00:00
|
|
|
# Backwards compatibility test.
|
|
|
|
(fold or [] [true false false])
|
|
|
|
]
|