3 ms·
(defun strlen (str) (loop for i from 0 for char across str finally (return i))) Works in my emacs... I (require 'cl).
by msg 17y ago
(defun strlen (str)
(loop for i from 0
for char across str
finally (return i)))
Works in my emacs... I (require 'cl).
- Zak 17y agoI suppose everything you called is a special form. It should have occurred to me that the loop macro could do it. Is the Loop macro Turing complete?