From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.help Subject: Re: Another question about lambdas Date: Tue, 13 Dec 2022 12:26:47 +0100 Message-ID: <86cz8ntuh4.fsf@gnu.org> References: <87tu23kw9x.fsf@web.de> <861qp67wgm.fsf@gnu.org> <87wn6yyflc.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18660"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 13 12:27:20 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1p53RP-0004fo-Uq for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Dec 2022 12:27:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p53RA-0002rp-0A; Tue, 13 Dec 2022 06:27:04 -0500 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 1p53R6-0002rQ-1l for help-gnu-emacs@gnu.org; Tue, 13 Dec 2022 06:27:00 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p53R5-0006Ey-OZ; Tue, 13 Dec 2022 06:26:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=KqPi5kjNghGnVDbRCXmimvl2pfA5tsNwdKqccbPC5/o=; b=a8Ap/KFnjyvwweqlhsnG rRyox2mVWg27QDat9s4m2E+4D6SRtdVEaUloY0iFz/aowPrCTaCVb4TP/v2uBiRbxm/Gm9oizE60j TZccHGVjXs5RFLdR6PlpQ7/UhWCKJiBcjCgUxyErUTv/La6+oOMDnDHO1WzYauB6n1Hd34gQ7NjfP au9sfKMmCSEHqUvEpEUTAuExkvkO2R5B1xs4izOL1UJUTz0CJr32p0i0lCsDrYRn7nRcWl9HotYGc 0XEYd7PAe1WG0zQ6NqkD2MqRRmKZ5ION7THRTrHe/1lGBjT7rRRFTXwvyYKUHPSQMFVy1t7005Lkk gOTZq9IR6fnhRQ==; Original-Received: from p5b3263c3.dip0.t-ipconnect.de ([91.50.99.195] helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p53R5-0005JN-BJ; Tue, 13 Dec 2022 06:26:59 -0500 In-Reply-To: <87wn6yyflc.fsf@web.de> (Michael Heerdegen's message of "Sun, 11 Dec 2022 01:00:15 +0100") X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141709 Archived-At: Michael Heerdegen writes: > it seems you didn't notice that you participated in a quiz! I think I grasped that, I've obviously missed the rule "No clarifying questions allowed" ;-) >> > What's the result of the following expression - and why? Or maybe >> > it is invalid? >> > >> > #+begin_src emacs-lisp >> > (let* ((x 'l) >> > (f (lambda () x)) >> > (x 'd)) >> > (funcall f)) >> > #+end_src > >> With lexical or with dynamic binding? > > "With lexical or with dynamic binding?" is the correct answer to the > question. So here another one for you: What's the result of this expression under lexical binding? (let (_) (defvar x) (let* ((x 'l) (f (lambda () x)) (x 'd)) (funcall f))) Best, Arash