$ 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
Created
March 22, 2021 16:38
-
-
Save samdphillips/5dd8c054eec8156f5ab185e1e59bc2cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(define m (vector-ref (current-command-line-arguments) 0)) | |
(dynamic-require m #f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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