unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Olivier Dion via General Guile related discussions <guile-user@gnu.org>
To: Taylan Kammer <taylan.kammer@gmail.com>,
	Tim Meehan <btmeehan@gmail.com>, guile-user <guile-user@gnu.org>
Subject: Re: Somehow I have got this "thunk" thing wrong.
Date: Sat, 06 Mar 2021 12:16:44 -0500	[thread overview]
Message-ID: <8735x8cidf.fsf@clara> (raw)
In-Reply-To: <58f9bcc8-a241-66d0-2396-c6dabb6ba273@gmail.com>

On Sat, 06 Mar 2021, Taylan Kammer <taylan.kammer@gmail.com> 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 :-) <https://www.youtube.com/watch?v=aAlR3cezPJg&t=743s>

>
> - Taylan
-- 
Olivier Dion
PolyMtl



      reply	other threads:[~2021-03-06 17:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06  0:05 Somehow I have got this "thunk" thing wrong Tim Meehan
2021-03-06  0:26 ` Christopher Baines
2021-03-06  3:40   ` Tim Meehan
2021-03-06  3:43     ` Tim Meehan
2021-03-06  0:31 ` Olivier Dion via General Guile related discussions
2021-03-06  0:48   ` Aleix Conchillo Flaqué
2021-03-06 16:55   ` Taylan Kammer
2021-03-06 17:16     ` Olivier Dion via General Guile related discussions [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735x8cidf.fsf@clara \
    --to=guile-user@gnu.org \
    --cc=btmeehan@gmail.com \
    --cc=olivier.dion@polymtl.ca \
    --cc=taylan.kammer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).