about summary refs log tree commit diff
path: root/configs/shared/.emacs.d/wpc/number.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2019-12-11T10·31+0000
committerWilliam Carroll <wpcarro@gmail.com>2019-12-24T15·21+0000
commitb3342afbfa28da3353195e611bd9d19eb6a6c587 (patch)
treeb55e1e8a26d592eca28e9dbb76e17b1ac68fd44b /configs/shared/.emacs.d/wpc/number.el
parent6b456c1b7a4f6899f063a6e65355af51901d9c7a (diff)
Temporarily disable code that creates circular deps
After attempting to package some of my Elisp libraries using Nix, I exposed
circular dependencies between modules that has existed for awhile.

I'm temporarily disabling this code since I do not have time to refactor
everything. When I get around to packaging everything, I'll need to resolve
these issues.

For now, I must carry on.
Diffstat (limited to 'configs/shared/.emacs.d/wpc/number.el')
-rw-r--r--configs/shared/.emacs.d/wpc/number.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/configs/shared/.emacs.d/wpc/number.el b/configs/shared/.emacs.d/wpc/number.el
index 81d3c5d2b935..f496349050d9 100644
--- a/configs/shared/.emacs.d/wpc/number.el
+++ b/configs/shared/.emacs.d/wpc/number.el
@@ -106,16 +106,18 @@ While this function is undeniably trivial, I have unintentionally done (- 1 x)
 
 ;; TODO: Does this belong in a math module?  Is math too vague?  Or is number
 ;; too vague?
-(defun number/factorial (x)
-  "Return factorial of `X'."
-  (cond
-   ((number/negative? x) (error "Will not take factorial of negative numbers"))
-   ((= 0 x) 1)
-   ;; NOTE: Using `series/range' introduces a circular dependency because:
-   ;; series -> number -> series.  Conceptually, however, this should be
-   ;; perfectly acceptable.
-   (t (->> (series/range 1 x)
-           (list/reduce 1 #'*)))))
+;; TODO: Resolve the circular dependency that this introduces with series.el,
+;; and then re-enable this function and its tests below.
+;; (defun number/factorial (x)
+;;   "Return factorial of `X'."
+;;   (cond
+;;    ((number/negative? x) (error "Will not take factorial of negative numbers"))
+;;    ((= 0 x) 1)
+;;    ;; NOTE: Using `series/range' introduces a circular dependency because:
+;;    ;; series -> number -> series.  Conceptually, however, this should be
+;;    ;; perfectly acceptable.
+;;    (t (->> (series/range 1 x)
+;;            (list/reduce 1 #'*)))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Tests
@@ -132,8 +134,8 @@ While this function is undeniably trivial, I have unintentionally done (- 1 x)
    (number/whole? 0))
   (prelude/assert
    (number/integer? 10))
-  (prelude/assert
-   (= 120 (number/factorial 5)))
+  ;; (prelude/assert
+  ;;  (= 120 (number/factorial 5)))
   (prelude/assert
    (number/even? 6))
   (prelude/refute