Skip to content

Instantly share code, notes, and snippets.

@samdphillips
Created March 22, 2021 16:38
Show Gist options
  • Save samdphillips/5dd8c054eec8156f5ab185e1e59bc2cc to your computer and use it in GitHub Desktop.
Save samdphillips/5dd8c054eec8156f5ab185e1e59bc2cc to your computer and use it in GitHub Desktop.
$ raco exe ++lang racket/base run.rkt
$ ./run t.rkt 
standard-module-name-resolver: collection not found
  for module path: racket/match
  collection: "racket"
  in collection directories:
  context...:
   body of '#%mzc:run
$ raco exe ++lang racket/base ++lib racket/match run.rkt
$ ./run t.rkt
tails
#lang racket/base
(define m (vector-ref (current-command-line-arguments) 0))
(dynamic-require m #f)
#lang racket/base
(require racket/match)
(displayln
(match (random 2)
[0 "heads"]
[1 "tails"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment