I'm trying to use the following function (extracted from the amazing emacs-prelude configuration)
(defun prelude-duplicate-current-line-or-region (arg)
"Duplicates the current line or region ARG times.
If there's no region, the current line will be duplicated. However, if
there's a region, all lines that region covers will be duplicated."
(interactive "p")
(pcase-let* ((origin (point))
(`(,beg . ,end) (prelude-get-positions-of-line-or-region))
(region (buffer-substring-no-properties beg end)))
(-dotimes arg
(lambda (n)
(goto-char end)
(newline)
(insert region)
(setq end (point))))
(goto-char (+ origin (* (length region) arg) arg))))
But I get the following error:
symbol's function definition is void: -dotimes
Any ideas why do I get this error? Do I have a library missing or something?