help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Closures - do you understand them well?


From: Eric Abrahamsen
Subject: Re: Closures - do you understand them well?
Date: Fri, 09 Dec 2022 08:50:33 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> The exercise originates from a mistake I made myself a while ago.
>> Sometimes your brain establishes shortcuts that lead to wrong
>> assumptions. It's human to fall into such traps.
>
> But I see that exercises that are just traps can be demotivating.
>
> I'm not sure how to write more motivating exercises, however, how would
> they look like?  Maybe like, you think it returns 3 but instead it
> returns...the perfect Christmas present you were looking for?
>
> #+begin_src emacs-lisp
>   (if (you-think-this-is-non-nil-but-isnt)
>       3
>     "You should buy XYZ.")
> #+end_src
>
> Have to think about it...

It's true I don't enjoy "exercises" in general -- a nice Christmas
present would be a motivation.

I would love to know closures well enough to put them into use without
having to spend extra time thinking and testing. But the fact is I *do*
need to spend extra time on it, and I rarely hit upon a problem that's
begging to be resolved with a closure, so...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]