From c43a63cc2e94f9144469765d1ff8275fb1b2b4e2 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Sun, 18 Aug 2024 20:55:31 +0200 Subject: [PATCH] hello world scheme --- yast/hello.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/yast/hello.scm b/yast/hello.scm index 4c0841a..83d2f17 100644 --- a/yast/hello.scm +++ b/yast/hello.scm @@ -1 +1,18 @@ +;; Hello world as a variable +(define vhello "Hello world") +;; Hello World as a function +(define fhello (lambda () + "hello world")) + +;; hello with name +(define hello + (lambda (name) + (string-append "hello " name "!"))) + +;; sum of three numbers +(define sum3 + (lambda (a b c) + (+ a b c))) + +;; display message on screen (display "Hello World!")