Add '29.nix'

This commit is contained in:
NaiJi ✨ 2022-04-23 01:19:30 +00:00
parent 5a4bb765a3
commit 0d15d19af0
1 changed files with 9 additions and 0 deletions

9
29.nix Normal file
View File

@ -0,0 +1,9 @@
with import <nixpkgs> { };
let
listOfNumbers = [2 4 6 9 27];
reverseList = lib.fold (x: y: y ++ [x]) [];
in
rec {
example = lib.reverseList listOfNumbers;
result = reverseList listOfNumbers;
}