diff options
| author | Andrey Listopadov <andreyorst@gmail.com> | 2022-08-26 11:37:48 +0300 |
|---|---|---|
| committer | Andrey Listopadov <andreyorst@gmail.com> | 2022-08-26 11:37:48 +0300 |
| commit | 825cd9f936a8890d3ccb1719173af76b9b4e161a (patch) | |
| tree | 80e1d74fd0ebd73c24b611d511c7c9672b38ac36 /init.fnl | |
| parent | 4144a9ce6913fb371fd29a24bac96e94690dfbd1 (diff) | |
proper count for counted collections
Diffstat (limited to 'init.fnl')
| -rw-r--r-- | init.fnl | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -718,7 +718,9 @@ If the sequence is empty, returns nil." (defn count "Count amount of elements in the sequence." [s] - (lazy.count s)) + (match (getmetatable s) + {:cljlib/type :vector} (length* s) + _ (lazy.count s))) (defn cons "Construct a cons cell. |