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: Re: cond clause does not allow definitions Date: Wed, 22 May 2024 22:33:07 +0200 Message-ID: References: <5d1be852da93dd324fdbcaa24ed1b444@aleph0.info> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8551"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: Jeronimo Pellegrini Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed May 22 22:33:54 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 1s9seo-0001sm-OK for guile-user@m.gmane-mx.org; Wed, 22 May 2024 22:33:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9seK-0003fX-05; Wed, 22 May 2024 16:33:24 -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 1s9seH-0003f8-V6 for guile-user@gnu.org; Wed, 22 May 2024 16:33:21 -0400 Original-Received: from mail-yb1-xb31.google.com ([2607:f8b0:4864:20::b31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9seG-0002CZ-7P for guile-user@gnu.org; Wed, 22 May 2024 16:33:21 -0400 Original-Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-df457d734abso1407279276.0 for ; Wed, 22 May 2024 13:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716409999; x=1717014799; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/Nm2MpaQxKeuUvT90dzqPkpbvaO9pC6ljDMpx/1JnRQ=; b=kFTHcQ2PU4oStwcM+hf9wEF+f4X0Xb3BND4D/wj/nSWurqFy49NysDxxBTzZ3Fm8la D983BiV31CIx2c/QNlZWpcP1IoSrKlYF0m+0CgVbwVBCdcc51O0jeziFQPuiFWlxUtNo TrEYA68MuoNb3sIBAjLTSuBeaOSR50Z9P1Zbyl9KvXiKM2AAcWkptaeN091GuhUUidnj UoAxp1RghGjA2l56J9vCDZnULc9wl8WrDOneHwWdPGA1zm8NIcYe+o8yUXhbPjYOn17c deY14DpNU7HlC12Xgq6IPWAmzEANnmBANymzI4vMoccRXfPawrK+jJ60T1orWLxmaSwW Cjkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716409999; x=1717014799; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/Nm2MpaQxKeuUvT90dzqPkpbvaO9pC6ljDMpx/1JnRQ=; b=WtCJkb3prpkZeZB/6gfNHf5Oc8I5oUEOqNmSUY15T5NR+0Z2s8pC4Z1wgcCVaaonxT 4rD0QoW/YEjrAuEIMrkuxwiyjDOZahEkuIwpek0U9O/zCi5J7cc0YVTnFfbvnYrdcqkf dH4AIHUawiN6RHsUpc+8g4d2KILGqUjPKIiXLAsg5lya1Ejii8KxSSoCVLykdSZG1JV1 M1jdgNxaYXWpZs1nB9Oxf8/C01Oo9gAaLkYIZSwYMXVbWjQIVG+XckTpVLIPLDuJkK9Q 3k+Wo8NJemoPeM85OjpQy80Z0SAs/BtEZsCLa5H37UESwD8otzyfBAKHGdR9mHqkRGZ5 g/Ug== X-Gm-Message-State: AOJu0Yzs7iR/pnNGGnSvdAkd5a79xq8MRGan+NlFXhnh4ZqjPoTxjARz DnPo8UsvpzZ+fwlhKQlQsTrdXNHl0CNbRVFj3u1dDcRvxqr5ty3eDZI7ZL/Odx0OGiEWwOoMDFR EbfSD7RPwfNqwljha5UwDHAbgr3q7R6es X-Google-Smtp-Source: AGHT+IH0y1ckps0jPex84EDyczRPbZfi2iPORf29j4L913xxuTW0Jxkf0VXLyuxAN/yM4DO5UMEZMPX1ULl9fkJHJ8s= X-Received: by 2002:a25:abeb:0:b0:df4:d79d:4f82 with SMTP id 3f1490d57ef6-df4e0bc7272mr3122074276.18.1716409999024; Wed, 22 May 2024 13:33:19 -0700 (PDT) In-Reply-To: <5d1be852da93dd324fdbcaa24ed1b444@aleph0.info> Received-SPF: pass client-ip=2607:f8b0:4864:20::b31; envelope-from=damien.mattei@gmail.com; helo=mail-yb1-xb31.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:19675 Archived-At: Bonjour, so it is with the version i currently use which is older than you: (base) mattei@mbp-touch-bar library-FunctProg % guile GNU Guile 3.0.8.99-f3ea8 Copyright (C) 1995-2022 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (cond (#t (define x 7) x)) While compiling expression: Syntax error: unknown file:1:10: definition in expression context, where definitions are not allowed, in form (define x 7) thanks On Wed, May 22, 2024 at 10:07=E2=80=AFPM Jeronimo Pellegrini wrote: > Hello! > > On 2024-05-22 16:26, Damien Mattei wrote: > > 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) > > I get no error here (Guile 3.0.9.164-e1690, compiled locally): > > scheme@(guile-user)> (cond (else (define x 7) x)) > $1 =3D 7 > scheme@(guile-user)> (cond (#t (define x 7) x)) > $2 =3D 7 > > A: (cond (#t (define x 7) x)) > B: (cond (else (define x 7) x)) > > | system | A | B | > |-------------|-------|-------| > | Bigloo | 7 | 7 | > | Biwa | 7 | 7 | > | Chez | error | 7 | > | Chibi | error | 7 | > | Chicken | 7 | 7 | > | Cyclone | 7 | 7 | > | Gambit | error | error | > | Gauche | 7 | 7 | > | Guile | 7 | 7 | > | Kawa | 7 | 7 | > | LIPS | 7 | error | > | Loko | error | error | > | MIT | error | 7 | > | Racket | 7 | 7 | > | Sagittarius | 7 | 7 | > | Scheme48 | error | 7 | > | Scheme 9 | error | 7 | > | SCM | 7 | 7 | > | STklos | 7 | 7 | > | Tinyscheme | 7 | 7 | > > * LIPS does not recognise the 'else' clause. > > J. >