summaryrefslogtreecommitdiff
path: root/Inheriting from sets.md
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2025-04-18 21:21:37 +0200
committerJasper Ras <jaspert.ras@gmail.com>2025-04-18 21:21:37 +0200
commita00113edd596f0bad40269573999abd844ca82b5 (patch)
treeff88579120b50642d43afd495a5ab72b6bfa1aba /Inheriting from sets.md
parente8341d867b2ce5752664d0b4be4fef440ad56f21 (diff)
vault backup: 2025-04-18 21:21:37
Diffstat (limited to 'Inheriting from sets.md')
-rw-r--r--Inheriting from sets.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/Inheriting from sets.md b/Inheriting from sets.md
new file mode 100644
index 0000000..556f3d4
--- /dev/null
+++ b/Inheriting from sets.md
@@ -0,0 +1,29 @@
+---
+tags:
+ - nix
+ - programming
+---
+```nix
+let x = 123; in
+{
+ inherit x;
+ y = 456;
+}
+```
+==
+```nix
+let x = 123; in
+{
+ x = x;
+ y = 456;
+}
+```
+
+Can reference set
+```nix
+inherit (src-set) a b c;
+```
+==
+```nix
+a = src-set.a; b = src-set.b; c = src-set.c;
+``` \ No newline at end of file