Hello World in SchemePublished on 25 December 2018 (Updated: 02 May 2020)
In this article, we will have a look at Hello World in Scheme, a minimalist dialect of Lisp.
How to Implement the Solution
At long last, here’s an implementation of Hello World in Scheme:
(display "Hello, World!")
If you checked out the tutorial on Hello World in Lisp, then this should be easy. First things first, we have the display function. The display function works exactly as you would expect. It takes some input and displays it to the user.
As a result, it’s natural to expect that the input in this case is Hello World. All we do is pass the Hello World string to display, and we’re done.
How to Run Solution
As usual, we can give it a go with an online Scheme interpreter. Just drop the code above into the editor and hit run.
Alternatively, we can download CHICKEN Scheme and a copy of the solution. Assuming CHICKEN Scheme is on our path, we can run the following from a command line:
csi -s hello-world.scm
That will run the Scheme file as a script which will quickly print the “Hello, World!” string.
- Hello World in Scheme on The Renegade Coder