Command Line

From Church Wiki
Jump to: navigation, search

How to run Church programs from the command line

The exact command to invoke Church from the command line depends on which Scheme implementation you are using.

For Ikarus:

ikarus --r6rs-script /path/to/

How to use command line arguments in a Church program

Use (command-line-arguments) to access a vector of command line arguments. For example, if you want to pass in one number as an argument like this ...

ikarus --r6rs-script /path/to/ 5

... you can use ...

(string->number (vector-ref (command-line-arguments) 0))

... to access this number.

Personal tools