Skip to content

Instantly share code, notes, and snippets.

@vyp
Last active November 13, 2017 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyp/ba606eb172435f23022571fff1a5432f to your computer and use it in GitHub Desktop.
Save vyp/ba606eb172435f23022571fff1a5432f to your computer and use it in GitHub Desktop.
Example of how to run GNU Guile scripts using nix-shell. πŸ™‚
#! /usr/bin/env nix-shell
#! nix-shell -i 'guile -e main' -p guile
!#
;; The following code is from:
;; https://www.gnu.org/software/guile/manual/html_node/The-Meta-Switch.html
(define (main args)
(map (lambda (arg) (display arg) (display " "))
(cdr args))
(newline))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment