From d233338919c2b11d4a5a2a2b7f071c8c265f7d1d Mon Sep 17 00:00:00 2001 From: Herwin Weststrate Date: Tue, 19 Dec 2017 18:27:57 +0100 Subject: [PATCH] Updated hello-world exercise The problem specification has been updated to drop the optional name argument. This resolves #34. --- exercises/hello-world/example.scm | 5 +---- exercises/hello-world/hello-world-test.scm | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/exercises/hello-world/example.scm b/exercises/hello-world/example.scm index be232dbe..23f8be30 100644 --- a/exercises/hello-world/example.scm +++ b/exercises/hello-world/example.scm @@ -1,7 +1,4 @@ (define-module (hello-world) #:export (hello)) -(define hello - (lambda* (#:optional name) - (let ((target (or name "World"))) - (string-concatenate (list "Hello, " target "!"))))) +(define (hello) "Hello, World!") diff --git a/exercises/hello-world/hello-world-test.scm b/exercises/hello-world/hello-world-test.scm index e3ac5952..61af5b46 100644 --- a/exercises/hello-world/hello-world-test.scm +++ b/exercises/hello-world/hello-world-test.scm @@ -10,12 +10,8 @@ (test-begin "hello-world") -(test-assert "Called with no args returns hello world" +(test-assert "Say Hi!" (equal? (hello) "Hello, World!")) -(test-assert "Called with an arg returns hello arg" - (equal? (hello "exercism") - "Hello, exercism!")) - (test-end "hello-world")