From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Trying to fix an error in the pypi-importer Date: Sun, 03 Jan 2016 19:47:06 +0100 Message-ID: <8737uelcut.fsf@elephly.net> References: <568453F6.1050605@gmail.com> <2c5756c8877a36699f8dbb07731ab3c1@riseup.net> <257e9ac376ee2c97785c0e63715ed38c@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFngU-00051N-Ed for guix-devel@gnu.org; Sun, 03 Jan 2016 13:47:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFngT-00032Y-Gz for guix-devel@gnu.org; Sun, 03 Jan 2016 13:47:18 -0500 In-reply-to: <257e9ac376ee2c97785c0e63715ed38c@riseup.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: swedebugia@riseup.net Cc: guix-devel , guix-devel-bounces+swedebugia=riseup.net@gnu.org > 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