Prefer somes? to some? in math.el

In a moment of strong opinions against variadic functions, I defined
maybe/somes? and redefined maybe/some? to be non-variadic. I'm not sure if I
feel as strongly about that change as I did when I made it. Either way, the
change remains and math.el is broken unless it consumes maybe/somes?, so... this
does that!
This commit is contained in:
William Carroll 2019-12-22 21:05:25 +00:00
parent 56692b3833
commit 274219cc63

View file

@ -28,13 +28,13 @@
(cl-defun math/triangle-of-power (&key base power result)
;; TODO: Assert two of three are set.
(cond
((maybe/some? base power result)
((maybe/somes? base power result)
(error "All three arguments should not be set"))
((maybe/some? power result)
((maybe/somes? power result)
(message "power and result"))
((maybe/some? base result)
((maybe/somes? base result)
(log result base))
((maybe/some? base power)
((maybe/somes? base power)
(expt base power))
(t
(error "Two of the three arguments must be set"))))