93ba483d9bc9
Move function
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sun, 25 Aug 2019 22:59:19 -0400 |
parents | 64aa58880d55 |
children | 72cd66a36853 |
branches/tags | (none) |
files | src/utils.lisp |
Changes
--- a/src/utils.lisp Sat Feb 23 12:42:13 2019 -0500 +++ b/src/utils.lisp Sun Aug 25 22:59:19 2019 -0400 @@ -34,6 +34,11 @@ (stream (alexandria:read-stream-content-into-string input)) (string (copy-seq input)))) +(defun ensure-list (value) + (if (listp value) + value + (list value))) + (defun hamming (sequence1 sequence2 &key (test #'eql)) "Return the Hamming distance between `sequence1` and `sequence2`." @@ -111,11 +116,6 @@ result)) -(defun ensure-list (value) - (if (listp value) - value - (list value))) - ;;;; Math --------------------------------------------------------------------- (defmacro do-sum ((var from to) &body body)