diff mbox series

[bug#53765,01/17] gnu: Add clojure-data-priority-map.

Message ID 87wnib32e2.fsf@reilysiegel.com
State New
Headers show
Series Remove limitations on clojure-tools | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Reily Siegel Feb. 4, 2022, 12:24 a.m. UTC
* gnu/packages/clojure.scm (clojure-data-priority-map): New variable.
---
 gnu/packages/clojure.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

M Feb. 9, 2022, 11:10 a.m. UTC | #1
Reily Siegel schreef op do 03-02-2022 om 19:24 [-0500]:
> [item priority]

Looks like Clojure code, so you can probably do use TeXinfo markup
here: @lisp{[item priority].

Greetings,
Maxime.
M Feb. 9, 2022, 11:18 a.m. UTC | #2
Reily Siegel schreef op do 03-02-2022 om 19:24 [-0500]:
> conj/peek/pop operations

What's ‘conj’ here?  While this term might make sense to Clojure
people, it is rather Clojure-specific and hence isn't meaningful to a
wide audience -- my first thought was that it meant ‘conjugation’
somehow.  Using non-standard terminology makes, say, translating
descriptions harder.  I would use standard terminology here: 'insert'
or 'add' instead of 'conj'.

Alternatively, you could rewrite the description to define a priority
map as a combination of a priority map and a priority queue and go from
there, avoiding naming the actual operations.

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index f728083eb2..3cf287140d 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -315,6 +315,36 @@  (define-public clojure-data-codec
 is on par with Java implementations, e.g., Apache commons-codec.")
     (license license:epl1.0)))
 
+(define-public clojure-data-priority-map
+  (package
+    (name "clojure-data-priority-map")
+    (version "1.1.0")
+    (home-page "https://github.com/clojure/data.priority-map")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1i6mf59g2l3vamris869mndy9l1bp5mzfqv5gj5qzzb937iiykm0"))))
+    (build-system clojure-build-system)
+    (arguments
+     '(#:source-dirs '("src/main/clojure")
+       #:test-dirs '("src/test/clojure")
+       #:doc-dirs '()))
+    (synopsis "Clojure library implementing priority maps")
+    (description "A priority map is very similar to a sorted map, but whereas
+a sorted map produces a sequence of the entries sorted by key, a priority map
+produces the entries sorted by value.
+
+In addition to supporting all the functions a sorted map supports, a priority
+map can also be thought of as a queue of [item priority] pairs.  To support
+usage as a versatile priority queue, priority maps also support conj/peek/pop
+operations.")
+    (license license:epl1.0)))
+
 (define-public clojure-data-xml
   (package
     (name "clojure-data-xml")