Skip to content

Instantly share code, notes, and snippets.

@obfusk
Last active November 12, 2018 17:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obfusk/47ce27af27f26a5a56b81bfd2fb067ab to your computer and use it in GitHub Desktop.
Save obfusk/47ce27af27f26a5a56b81bfd2fb067ab to your computer and use it in GitHub Desktop.
nix repl
with builtins;
compareVersions "3.7.1-rc2" "3.7.1"
# => 1
baseNameOf "foo//"
# => ""
with builtins;
let words = s: filter (x: isString x && x != "") (split "[[:space:]]+" s);
in words " foo bar baz "
# => [ "foo" "bar" "baz" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment