> So removing the (else -> to a comment and adjusting the parentheses did 
> not work.
>
> Could somebody point me to relevant documentation about how to write 
> conditional statements in guile?

In Scheme a conditional statement just looks like this:

  (if condition
    expression-a
    expression-b)

If the condition evaluates to “#t” then “expression-a” is evaluated.
Otherwise “expression-b” is evaluated.  “expression-a” and
“expression-b” can be something more complicated, too:

  (if (zero? number)
    ;; "then" ...
    (let ((name "swedebugia"))
      (format #t "The number was zero, ~a.\n" name))
    ;; "else" ...
    (begin
      (display "The number was not zero.")
      (display "I’m not done yet.")
      (display "Well, now I am.")))

Chapter 3 of the Guile info manual contains a useful introduction to
Scheme.

~~ Ricardo


Reply via email to