From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Olivier Dion via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: Re: Somehow I have got this "thunk" thing wrong. Date: Sat, 06 Mar 2021 12:16:44 -0500 Message-ID: <8735x8cidf.fsf@clara> References: <87lfb1yvfx.fsf@clara> <58f9bcc8-a241-66d0-2396-c6dabb6ba273@gmail.com> Reply-To: Olivier Dion Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17790"; mail-complaints-to="usenet@ciao.gmane.io" To: Taylan Kammer , Tim Meehan , guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Mar 06 18:15:48 2021 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 1lIaWp-0004Vd-Vd for guile-user@m.gmane-mx.org; Sat, 06 Mar 2021 18:15:47 +0100 Original-Received: from localhost ([::1]:60272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIaWo-0005zZ-W7 for guile-user@m.gmane-mx.org; Sat, 06 Mar 2021 12:15:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIaWc-0005yR-9g for guile-user@gnu.org; Sat, 06 Mar 2021 12:15:34 -0500 Original-Received: from smtp.polymtl.ca ([132.207.4.11]:56886) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIaWX-0003jG-TG for guile-user@gnu.org; Sat, 06 Mar 2021 12:15:33 -0500 Original-Received: from localhost ([89.36.78.154]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 126HFMKV027368 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 6 Mar 2021 12:15:27 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 126HFMKV027368 In-Reply-To: <58f9bcc8-a241-66d0-2396-c6dabb6ba273@gmail.com> X-Poly-FromMTA: ([89.36.78.154]) at Sat, 6 Mar 2021 17:15:22 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.lisp.guile.user:17346 Archived-At: On Sat, 06 Mar 2021, Taylan Kammer wrote: > On 06.03.2021 01:31, Olivier Dion via General Guile related discussions > wrote: >> You've quoted the whole s-exp. Which means lambda is never applied. >> You have to apply lambda in order to create a procedure. > > Just a bit of pedantry on the terms: 'lambda' is not "applied" anyway, > because it's a special form and not a procedure. > > The term "apply" is used when referring to procedures. E.g. you would > apply 'list', 'cons', 'vector-ref' and so on, but you wouldn't apply > 'lambda', 'if', 'define' and so on. > > In other words, if you can pass it as an argument to 'apply', you can > "apply" it. E.g. '(apply lambda (list ...))' is invalid syntax. > > I think the term "evaluate" would be preferred here, as in: "the > 'lambda' is quoted so it won't be evaluated." You're totally right! Lambda is evaluated to a closure. The latter is then applied to evaluate its expressions in the captured environment. The following video explains the metacircular evaluator in great details! Highly recommend all other lectures as well :-) > > - Taylan -- Olivier Dion PolyMtl