From db957f30419151f971db46bac38142b7b86a0beb Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 4 Mar 2017 19:51:22 -0800 Subject: [PATCH] samplers --- beautiful-racket-demo/basic-demo-3/expander.rkt | 3 ++- beautiful-racket-demo/basic-demo-3/report-args.rkt | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 beautiful-racket-demo/basic-demo-3/report-args.rkt diff --git a/beautiful-racket-demo/basic-demo-3/expander.rkt b/beautiful-racket-demo/basic-demo-3/expander.rkt index 5f2ec23..b26f2ad 100644 --- a/beautiful-racket-demo/basic-demo-3/expander.rkt +++ b/beautiful-racket-demo/basic-demo-3/expander.rkt @@ -41,5 +41,6 @@ (for/list ([(val idx) (in-indexed (current-command-line-arguments))]) - (list (suffix-id #'arg idx #:context ctxt) val)))) + (list (suffix-id #'arg idx #:context ctxt) + (or (string->number val) val))))) diff --git a/beautiful-racket-demo/basic-demo-3/report-args.rkt b/beautiful-racket-demo/basic-demo-3/report-args.rkt new file mode 100644 index 0000000..0289e67 --- /dev/null +++ b/beautiful-racket-demo/basic-demo-3/report-args.rkt @@ -0,0 +1,6 @@ +#lang basic-demo-3 +10 print "arg0 is " ; arg0 +20 print "arg1 + arg1 is " ; arg1 + arg1 +30 print "arg2 is " ; arg2 +40 print "arg3 is " ; arg3 +50 print "arg4 is " ; arg4 \ No newline at end of file