Browse Source

Make sure seq-map-indexed is always defined

workspaces
Nicolas Petton 5 years ago
parent
commit
0bc8afd7eb
Signed by: nico GPG Key ID: 233587A47C207910
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      indium.el

+ 10
- 1
indium.el View File

@ -35,7 +35,16 @@
;; being already provided, the correct version of seq.el won't get loaded.
(require 'seq)
(unless (fboundp 'seq-map-indexed)
(require 'seq-25))
(defun seq-map-indexed (function sequence)
"Return the result of applying FUNCTION to each element of SEQUENCE.
Unlike `seq-map', FUNCTION takes two arguments: the element of
the sequence, and its index within the sequence."
(let ((index 0))
(seq-map (lambda (elt)
(prog1
(funcall function elt index)
(setq index (1+ index))))
sequence))))
(require 'indium-backend)
(require 'indium-chrome)


Loading…
Cancel
Save