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

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

bug#42323: 26.3; Doc string of `seq-map'


From: Lars Ingebrigtsen
Subject: bug#42323: 26.3; Doc string of `seq-map'
Date: Wed, 09 Dec 2020 17:44:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Details: yes, it's good to have a list of implementations.

The implementations are a way to optimise the functions -- they provide
no (well, little) information needed to use the functions.  So I'd argue
that they aren't needed by users.

That is, whether seq-map is optimised by doing

(defun seq-map (function sequence)
  (if (eq (type-of sequence) 'list)
      (seq-map-list ...)
    (seq-map-general ...)))

or whether that's achieved by defgeneric is immaterial to people using
seq-map: The interface to use remains identical.

> I wonder to what that is actually referring to.  There is only one
> implementation in seq.el...?

There's two:

(cl-defgeneric seq-map (function sequence)
(cl-defmethod seq-map (function (sequence sequence))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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