This tutorial explains about writing the Hello World Simple program in Lisp language.
Hello, World is the first program learned by Developers to learn Programming language.
Let’s see how to write a Hello World Sample program in Lisp.
Hello World Sample program in Lisp
There are multiple ways we can write the hello world program
Comments are written using at the start
; with append comment text.
One way is using write-line
write-line used to log the string into the console.
; Hello World Comment (write-line "Hello World Welcome to W3schools.")
Another way using the format.
the format is a function used to format the text similarly to printf in golang
(format t "Hello, Welcome to w3schools.io")
Third way using write a function
defuc is used to create a function The function is defined and printed hello world
Here is the function declaration
(defun hello () (format t "Hello, Welcome to w3schools.io"))
You can call the hello function using the below code