summaryrefslogtreecommitdiff
path: root/hello/hello.scm
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-05-18 14:34:37 -0600
committerbd <bdunahu@operationnull.com>2024-05-18 14:47:07 -0600
commit6eb36d8a2f317f2eb49832f3ee06f24204c9e4fb (patch)
tree3c6710d8116d8c3e65c070fa9fffc67ae653fcf9 /hello/hello.scm
Hello, Palindrome, & Number-Guesser code-bases
Diffstat (limited to 'hello/hello.scm')
-rwxr-xr-xhello/hello.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/hello/hello.scm b/hello/hello.scm
new file mode 100755
index 0000000..bf8dfa0
--- /dev/null
+++ b/hello/hello.scm
@@ -0,0 +1,16 @@
+(define-module (hello))
+
+(define GREETING_PREFIX "hello ")
+(define GREETING_SUFFIX "\n")
+(define DEFAULT_ADDRESSEE "world")
+
+
+(define-public hi
+ (lambda* (#:optional name)
+ (string-append GREETING_PREFIX (addressee name) GREETING_SUFFIX)))
+
+(define addressee
+ (lambda (name)
+ (if name
+ name
+ DEFAULT_ADDRESSEE)))