Commit 11da3816 authored by Antoine Martin's avatar Antoine Martin
Browse files

Add small utility functions

parent 871049bb
......@@ -79,6 +79,17 @@
(defun get-first-letter (sequence)
(subseq sequence 0 1))
(defun is-number (string)
(let ((chara (char string 0)))
(and (>= (char-code chara) (char-code #\0))
(<= (char-code chara) (char-code #\9)))))
(defun letter-has-changed (previous new)
(if (and (is-number previous)
(is-number new))
t
(string= previous new)))
(defun build-index (path file-path)
(with-open-file (file file-path
:direction :output
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment