# HG changeset patch # User Steve Losh # Date 1566788359 14400 # Node ID 93ba483d9bc9266f33400de2518e828769aa6cfc # Parent 64aa58880d55892b85facf4ea8aedb0f080c3f70 Move function diff -r 64aa58880d55 -r 93ba483d9bc9 src/utils.lisp --- 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)