;;; -*- lexical-binding: t -*-
;;;
;;; this file:
;;; http://user.it.uu.se/~embe8573/emacs-init/negative-subtraction.el
;;; https://dataswamp.org/~incal/emacs-init/negative-subtraction.el
(require 'cl-lib)
(require 'parse-time)
(defun negative-subtract (a b)
(let*((a-nums (number-to-list a))
(b-nums (number-to-list b)) )
(cl-loop for i in a-nums
for j in b-nums
collect (- i j) )))
;; (negative-subtract 8888 7777)
(defun number-to-list (n)
(cl-loop for d
across (prin1-to-string n)
collect (cl-digit-char-p d) ))
;; (listp (number-to-list 1234))