Skip to content

Instantly share code, notes, and snippets.

@dacr
Created March 28, 2025 09:02
Show Gist options
  • Save dacr/ecaff8e993ba6dadfc28eb0aec7ddd39 to your computer and use it in GitHub Desktop.
Save dacr/ecaff8e993ba6dadfc28eb0aec7ddd39 to your computer and use it in GitHub Desktop.
nix list / published by https://github.com/dacr/code-examples-manager #729edcf0-c5d4-41cd-a977-541f4399952f/8bf8bc3870a4c915635976486c4e3cdd8a698a02
## summary : nix list
## keywords : nix, list
## publish : gist
## authors : David Crosson
## license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
## id : 729edcf0-c5d4-41cd-a977-541f4399952f
## created-on : 2025-02-07T17:36:39+01:00
## managed-by : https://github.com/dacr/code-examples-manager
## run-with : nix eval --file $file
#### run-with : nix-instantiate --eval $file
let
list1 = [1 [42 3] 4];
in with builtins; {
look_for_42_1 = (head (tail list1)) ;
look_for_42_2 = (elemAt (elemAt list1 1) 0) ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment