diff options
author | William Carroll <wpcarro@gmail.com> | 2022-07-29T18·15-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-07-30T00·35+0000 |
commit | 230c4bbb3e9f44875d6593a7c6cb0ca33bb63805 (patch) | |
tree | 55207bf03a894ffdd2b5687216081ee81e3fb195 /users/wpcarro/emacs/.emacs.d/wpc/math.el | |
parent | 4a4f8f93583df81344dd1c91f033d8644028dc85 (diff) |
feat(wpcarro/emacs): Package maybe.el r/4344
(Temporarily) remove dependency on list.el in favor of dash, which I'm not thrilled about. Change-Id: Ic4348ee72582dee63ba07a183f3bda65baa7e2d6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5999 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro/emacs/.emacs.d/wpc/math.el')
-rw-r--r-- | users/wpcarro/emacs/.emacs.d/wpc/math.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/math.el b/users/wpcarro/emacs/.emacs.d/wpc/math.el index 4013ce3be21d..dbc527928a30 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/math.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/math.el @@ -13,6 +13,7 @@ ;; Dependencies ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(require 'dash) (require 'maybe) (require 'cl-lib) @@ -31,13 +32,13 @@ ;; Int -> Int -> Int -> Boolean (cl-defun math-triangle-of-power (&key base power result) (cond - ((maybe-somes? base power result) + ((-all? #'maybe-some? (list base power result)) (error "All three arguments should not be set")) - ((maybe-somes? power result) + ((-all? #'maybe-some? (list power result)) (message "power and result")) - ((maybe-somes? base result) + ((-all? #'maybe-some? (list base result)) (log result base)) - ((maybe-somes? base power) + ((-all? #'maybe-some? (list base power)) (expt base power)) (t (error "Two of the three arguments must be set")))) |