Questions tagged [recursion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

Dom traversal return nil even though the test condition seems to be true

The purpose of the traversal this time is to be able to visit each node, if there is a specific attribute inside that node, it should return true, add that node to the list and proceed on the next ...
-1 votes
2 answers
147 views

Web scraping traversal using dom.el, pcase error: Unknown pattern

I would like to traverse the dom tree, extract the text and build a list after visiting each node. Implementing the recursion with the help of text-tag function returned an unknown pattern error. The ...
0 votes
1 answer
56 views

Text extraction after dom traversal returns empty

I would like to extract the text from each visited node but while traversing and build a list. I only get an empty result. Here is the following attempt using dom.el (defun extract-text-from-dom (dom-...
2 votes
1 answer
181 views

largest safe value of max-lisp-eval-depth

C-h v max-lisp-eval-depth: You can safely make it considerably larger than its default value, if that proves inconveniently small. Yes, I want it to be as large as possible. However, the docstring ...
3 votes
1 answer
304 views

“named-let” bug?

The following code seems fine semantically: ;; -*- lexical-binding: nil; -*- (named-let f ((_ '(1))) (dolist (paren-1-paren _) (f ()))) Why does it throw an error? (Is this a bug? If so, I will ...
3 votes
2 answers
150 views

Simple recursive function freezes Emacs — how to correct the definition?

I was trying to familiarize myself with several languages by doing the advent of code exercises in these languages, and one that got me stuck is Emacs Lisp, in the very first exercise. The goal is to ...
0 votes
0 answers
48 views

Mutually recursive bytecode function throws an error when I try to eval

The following workflow contains the steps needed to reproduce the error: ;; Byte-compile the function. (byte-compile '(defun flatten (x) (cl-labels ((rec (x acc) ...
0 votes
1 answer
139 views

Having a hard time understanding some of Paul Graham's example code in his book “On Lisp” [closed]

https://sep.yimg.com/ty/cdn/paulgraham/onlisp.pdf On page 36 Paul introduces the following function: (defun flatten (x) (labels ((rec (x acc) (cond ((null x) acc) ...