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

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

Re: How to create a higher order function?


From: Emanuel Berg
Subject: Re: How to create a higher order function?
Date: Tue, 21 Sep 2021 13:48:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Leo Butler wrote:

>> It seems to work fine, even if it's a bit complicated.
>>
>> Of course, the more obvious way to do it is to use the
>> first definition under lexical scope (C):
>>
>> ;;; -*- lexical-binding: t; -*-
>> (defun negate (fun)
>>   "Try to return a function returning the logical opposite of FUN."
>>   (lambda (&rest args)
>>     (not (apply fun args))))
>
> Obviously C is better.

Let's RETURN to the POINT(ER): you can do it with C ...

> Q: I see you use mu4e. How do you get the code highlighted?
> (in my Gnus, the background is distinctive blue).

Yep, looks baaad!

The face is `mm-uu-extract', one can disable it that way.

Do `gnus-summary-show-article' with C-u to see that it looks
like this:

--8<---------------cut here---------------start------------->8---
;;; -*- lexical-binding: nil; -*-
(defun negate (fun)
  "Try to return a function returning the logical opposite of FUN."
  (lambda (&rest args)
    (not (apply fun args))))
--8<---------------cut here---------------end--------------->8---

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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