Skip to content

Commit

Permalink
fix timeseries/keep-latest docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
bortexz committed Sep 30, 2022
1 parent a1b2221 commit 0cf7df4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## 0.0.2 - 2022-09-30
### Fix
- docstring of `timeseries.keep-latest` to be consistent with code behaviour.

## 0.0.1

Initial release
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Collection of timeseries technical analysis indicators as [graphcom](https://git

### Clojure CLI/deps.edn
```clojure
io.github.bortexz/graphcom {:mvn/version "0.0.1"}
io.github.bortexz/graphcom {:mvn/version "0.0.2"}
```

### Leiningen/Boot
```clojure
[io.github.bortexz/graphcom "0.0.1"]
[io.github.bortexz/graphcom "0.0.2"]
```

## Description
Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(:require [org.corfield.build :as bb]))

(def lib 'io.github.bortexz/tacos)
(def version "0.0.1")
(def version "0.0.2")

(defn- gha-output
[k v]
Expand Down
3 changes: 1 addition & 2 deletions src/bortexz/tacos/timeseries.clj
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@

(defn keep-latest
"Keeps only `n` latest values of timeseries `coll`. Same as `(create (tail coll n))`, but faster when number of items
to be removed is small (currently < 10), as it dissoc's the earliest items instead of creating a new timeseries.
When number of items to remove is >= 10, falls back to `(create (tail coll n))`."
to be removed is small (currently < 5), as it dissoc's the earliest items instead of creating a new timeseries."
[coll n]
(let [size (count coll)]
(if (> size n)
Expand Down

0 comments on commit 0cf7df4

Please sign in to comment.