# CL Happy Numbers

DevFeed: [CL Happy Numbers](<https://devfeed.tech/articles/cl-happy-numbers-34479.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2012/11/cl-happy-numbers/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2012-11-20T17:20:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Common Lisp](<https://devfeed.tech/topics/common-lisp.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [emacs](<https://devfeed.tech/tags/emacs.md>), [emacs-lisp](<https://devfeed.tech/tags/emacs-lisp.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

This article revisits the Happy Numbers problem while exploring an implementation in Common Lisp. It compares approaches for iterating over digits, discusses using loop and setf values, and describes a faster method based on truncate, with references to earlier SQL and Emacs Lisp implementations.

## Source excerpt

A while ago I stumbled upon Happy Numbers as explained in programming praxis, and offered an implementation of them in SQL and in Emacs Lisp. Yeah, I know. Why not, though? Today I'm back on that topic and as I'm toying with Common Lisp I though it would be a good excuse to learn me some new tricks. As you can see from the earlier blog entry, last time I did attack the digits problem quite lightly. Let's try a better approach now.