From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.user Subject: cond clause does not allow definitions Date: Wed, 22 May 2024 21:26:09 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4542"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed May 22 21:27:01 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s9rc5-0000ss-JQ for guile-user@m.gmane-mx.org; Wed, 22 May 2024 21:27:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9rbW-0002Tw-T4; Wed, 22 May 2024 15:26:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9rbV-0002Ti-4K for guile-user@gnu.org; Wed, 22 May 2024 15:26:25 -0400 Original-Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9rbT-00077n-KR for guile-user@gnu.org; Wed, 22 May 2024 15:26:24 -0400 Original-Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-7949f39ce4eso22912185a.3 for ; Wed, 22 May 2024 12:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716405982; x=1717010782; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=+jyciM0yjwiVtkxK7TnVMLzqwSxLr6EKF5oP/q8prSo=; b=QykfDT/mYtEonQGniDxV8KWSKWBnPaRWj5oU1prBdV/e1cGuYtrxmEGGkfh9GNsZaZ Ff4Nf++Z6hwF4d04NE4S6ki3fT/AzeGgcNhVOhg6i32JuICGQsUuSv/6siVsnmlCJBBA Bg29/b0v2ZvoPDNyjIzCsYgyPK4GHBeEtkmrErZ1AdkjHIY1XhMDahT0HleSEROnyQJ7 OT9XV1D8xBJDmb4W53eU91AC3/+YcOyeb/AgV0jv9/wTWIjdFwDF5MTKSLBeiPXz8nJf 7iB/xn8yJJKTurS+E6k47w55iETSvwweo0Aa6NpPYj678/qd1GkGhBxAqcRxZ3zVNVA3 eyig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716405982; x=1717010782; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+jyciM0yjwiVtkxK7TnVMLzqwSxLr6EKF5oP/q8prSo=; b=Hg3hT3CGOeFZO+YsaHTFUtgcundttkbeIiyga9iQDJsl25Pxl+eB/W0j5h9ltbE9QF mOuubJc2vKw0/mAF74lDo8TXqNgYZLRAOIdVHw6IDg7e7WS6GsAdGR6EHtZdIDwPHERj T7i1GCTwLgA4be76DqZTDz32OUfprpolDthyZwVA9pexM93y986fiLJWe4oLJ9Ni0T6S axs/HcbVTjb7Bl6FWEsuYVUiX0PjaPfxQSRfag1p9NBcktKguzeMABpej8otEJLjAJkD MURDYqIB01Ir9OBmvpOacvuex8+nbi+wVF/lv9Ub4dtMoE+MjJyXM7AyIzbA4kfYiL4p 1w+w== X-Gm-Message-State: AOJu0YyPsYrnRbp9kzQvHeyvsPK1zRuTYiZgek6TCpLK4+MUwkabW8ya HpOHv9BvjzeP8cWABRRUMSfgvJbiGJP1c1NT4BF+GrbeTBzOs/BOAGv9BFXcVl3m8ZIab2vjTlf 9NRbd5HkS+AZMzDp1sGQ0Gsj8B3RD1wpo X-Google-Smtp-Source: AGHT+IH+8MKP9YveqxKLTfV+ZolBelPeMWxmIMbBTtZYS/7KwFZH+iEXhPni74UGhFn9Zqt2LZuo3pY4I6QSELbeCJM= X-Received: by 2002:a05:620a:4ce:b0:792:6e88:2800 with SMTP id af79cd13be357-794994b261fmr340548185a.57.1716405981943; Wed, 22 May 2024 12:26:21 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::72c; envelope-from=damien.mattei@gmail.com; helo=mail-qk1-x72c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19673 Archived-At: scheme@(guile-user)> (cond (#t (define x 7) x)) While compiling expression: Syntax error: unknown file:7:10: definition in expression context, where definitions are not allowed, in form (define x 7) but it is allowed in else clause: scheme@(guile-user)> (cond (else (define x 7) x)) $4 = 7 not really logic it is allowed in Kawa and Racket but they are not scheme references the R5RS and R7RS talk about 'clause' without more information is it normal for Guile to consider clause for cond to be an expression context and not a definition context? should not be better to consider definition context? that would allow more possibilities.