summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2023-01-11 19:45:13 +0000
committerDaniel Santos <dacs.git@brilhante.top>2023-01-12 12:14:40 +0000
commitae07b3ca18e380abe17c669c96915f3e2a8f31de (patch)
tree9b8264e31da857acbf076f900fc6eda8f1ee03a3
parent74b1bb30dc0afab49eefe97a2022acc3d3c76d6c (diff)
downloadcl-math-ae07b3ca18e380abe17c669c96915f3e2a8f31de.tar.gz
add implode-string and doc update of explode-string
-rw-r--r--cl-math.lisp10
1 files changed, 7 insertions, 3 deletions
diff --git a/cl-math.lisp b/cl-math.lisp
index a022c4d..3bcddfb 100644
--- a/cl-math.lisp
+++ b/cl-math.lisp
@@ -23,9 +23,13 @@
   "Given a list of the symbols of a number (which can have letters), it returns the symbol of this number"
   (intern (apply #'concatenate 'string (mapcar #'symbol-name number))))
 
-(defun explode-string (number)
-  "Given a string of a number (which can have letters), it returns a list of the number"
-  (loop for letter across number collect (string letter)))
+(defun explode-string (string)
+  "Given a string of a number (which can have letters), it returns a list of strings of the number"
+  (loop for letter across string collect (string letter)))
+
+(defun implode-string (string)
+  "Given a list of strings of a number (which can have letters), it returns the string of this number"
+  (apply #'concatenate 'string string))
 
 (defun next-list-number (numerals number-list)
   "Given a list of a numeral system and a list of a number, it returns a list of the next number."