diff options
| author | 2024-07-26 23:00:20 +0200 | |
|---|---|---|
| committer | 2024-07-26 23:00:20 +0200 | |
| commit | 8178be9efa1d4c88808268f0f27ae5a3f63d1b3f (patch) | |
| tree | e34d719ebe7479250930a7fdac68d15b6b40ef79 /dot_config/nvim | |
| parent | nvim: rename tbl to mixed-table, import it as "·" (diff) | |
nvim: update :toast.core/assoc
Thank you Olical for updating fennel!
Move to `(set (. t k) v)` for overwriting non-insertion list elements.
Also don't bother specifying a `k` for the insertion case, seeing as we
know for a fact it's just the final element.
Diffstat (limited to '')
| -rw-r--r-- | dot_config/nvim/fnl/toast/core.fnl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dot_config/nvim/fnl/toast/core.fnl b/dot_config/nvim/fnl/toast/core.fnl index 16e69c2..2a426d1 100644 --- a/dot_config/nvim/fnl/toast/core.fnl +++ b/dot_config/nvim/fnl/toast/core.fnl @@ -58,8 +58,8 @@ [k v & xs] [...]] (case k nil nil - (where k (and (number? k) (> lt k))) (tset t k v) ; TODO: (set (. t k) v) - (where k (and (number? k) (= k lt))) (table.insert t k v) + (where k (and (number? k) (> lt k))) (set (. t k) v) + (where k (and (number? k) (= k lt))) (table.insert t v) _ (tset t k v)) (case (length xs) 0 t |
