summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cl-math.lisp18
1 files changed, 9 insertions, 9 deletions
diff --git a/cl-math.lisp b/cl-math.lisp
index da572de..a022c4d 100644
--- a/cl-math.lisp
+++ b/cl-math.lisp
@@ -15,17 +15,17 @@
 	number
 	(reverse number)))
 
-(defun explode (number)
-  "Given a number (which can have letters), it returns a list of the number"
+(defun explode-to-symbol (number)
+  "Given a number (which can have letters), it returns a list of the symbols of this number"
   (loop for letter across (write-to-string number) collect (intern (string letter))))
 
-(defun implode (number)
-  "Given a list of a number (which can have letters), it returns the number"
+(defun implode-from-symbol (number)
+  "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 number (which can have letters), it returns a list of the number"
-  (loop for letter across number collect (intern (string letter))))
+  "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 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."
@@ -71,7 +71,7 @@
 
 (defun plus (numerals a b)
   "Given a list of a numeral system and 2 numbers, it returns the list of it's sum."
-  (may-reverse (plus-args-list numerals (may-reverse (explode a)) (may-reverse (explode b)))))
+  (may-reverse (plus-args-list numerals (may-reverse (explode-to-symbol a)) (may-reverse (explode-to-symbol b)))))
 
 (defun plus-string (numerals a b)
   "Given a list of a numeral system and 2 strings, it returns the list of it's sum."
@@ -83,8 +83,8 @@
 
 (defun plus-decimal (&rest args)
   "Given decimal numbers, it returns the symbol it's sum."
-  (nth-value 0 (implode (reduce (lambda (a b) (plus '(|0| |1| |2| |3| |4| |5| |6| |7| |8| |9|) a b)) args))))
+  (nth-value 0 (implode-from-symbol (reduce (lambda (a b) (plus '(|0| |1| |2| |3| |4| |5| |6| |7| |8| |9|) a b)) args))))
 
 (defun plus-earth (&rest args)
   "Give earthal numbers, it returns it's sum."
-  (symbol-to-number (nth-value 0 (implode (reduce (lambda (a b) (plus '(|1| |2| |3| |4| |5|) a b)) args)))))
+  (symbol-to-number (nth-value 0 (implode-from-symbol (reduce (lambda (a b) (plus '(|1| |2| |3| |4| |5|) a b)) args)))))