Skip to content

Command line

Given a file named “main.scm” with:

(import (scheme base) (scheme process-context))
(map write-string (command-line))

When I successfully run stak main.scm hello

Then the stdout should contain “hello”.

Given a file named “main.scm” with:

(import (scheme base) (scheme process-context))
(map write-string (command-line))

When I successfully run stak main.scm hello world

Then the stdout should contain “hello”

And the stdout should contain “world”.

Given a file named “main.scm” with:

(import (scheme base) (scheme cxr) (scheme process-context))
(write-string (<procedure> (command-line)))

When I successfully run stak main.scm foo bar baz

Then the stdout should contain “<output>”.

procedureoutput
cadrfoo
caddrbar
cadddrbaz