 ;;
 ;;; Library
 
+;; TODO Refactor all of me to be more functional!
+
 (defun doom-cli-packages-install ()
   "Installs missing packages.
 

             (packages (hash-table-keys straight--packages-to-rebuild)))
         (sort packages #'string-lessp)
         (doom--finalize-straight)
         (doom-cli-packages-build)
         (print! (success "Updated %d package(s)") count))
       t))))



declaration) or dependency thereof that hasn't already been."
  (print! (start "Installing & building packages..."))
  (print-group!
   (let ((versions-alist doom-pinned-packages)
         (n 0))
     (dolist (recipe (hash-table-values straight--recipe-cache))
       (straight--with-plist recipe
           (package local-repo)
         (let ((existed-p (file-directory-p (straight--repos-dir package))))
           (condition-case-unless-debug e
               (and (straight-use-package
                     (intern package) nil nil
                     (make-string (1- (or doom-format-indent 1)) 32))
                    (not existed-p)
                    (file-directory-p (straight--repos-dir package))
                    (if-let (commit (cdr (assoc package versions-alist)))
                        (progn
                          (print! "Checking out %s commit %s"
                                  package (substring commit 0 7))
                          (unless (straight-vc-commit-present-p recipe commit)
                            (straight-vc-fetch-from-remote recipe))
                          (straight-vc-check-out-commit recipe commit)
                          t)
                      t)
                    (cl-incf n))
             (error
              (signal 'doom-package-error
