fbg111 wrote: > > listlen([First|TheRest]) -> 1 + listlen([TheRest]). You are creating a (non-empty) list at every step. Therefore your code recurses infinitely. This code should be: listlen([First|TheRest]) -> 1 + listlen(TheRest). TheRest (the tail of the list) is already a list. -- Romain LENGLET