diff options
Diffstat (limited to 'gnosis-algorithm.el')
-rw-r--r-- | gnosis-algorithm.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index ed46149..da9a070 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -74,6 +74,12 @@ NOTE: Do not change this value above 1" :group 'gnosis :type 'integer) +(defun gnosis-algorithm-replace-at-index (index new-item list) + "Replace item at INDEX with NEW-ITEM in LIST." + (cl-loop for item in list + for i from 0 + collect (if (= i index) new-item item))) + (defun gnosis-algorithm-date (&optional offset) "Return the current date in a list (year month day). |