Created
April 6, 2015 15:50
-
-
Save florence/c6870b42b4c33e3b8a6c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
(define ns (make-base-namespace)) | |
(namespace-attach-module (current-namespace) ''#%builtin ns) | |
(define args (contract (vectorof string?) (vector "a") 'pos 'neg)) | |
(parameterize ([current-namespace ns]) | |
(define current-args | |
(namespace-variable-value 'current-command-line-arguments ns)) | |
(parameterize ([current-args args]) | |
args)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gives error:
current-command-line-arguments: contract violation
expected: (vectorof string?)
given: '#("a")