我应该使用 Clojure 的手指树做什么?

发布于 2024-09-28 04:32:42 字数 383 浏览 0 评论 0原文

Clojure 的新 contrib 库组有一个 手指树 。 Clojure 中手指树的用例有哪些?何时应该使用手指树来代替 clojure 的其他持久数据结构之一:向量、集合、映射、持久队列等。

Clojure 的乐趣 提到手指树可用于需要廉价插入和删除的索引集合。它们也被描述为“数据结构的瑞士军刀”。非常感谢这样的例子。

Clojure's new contrib library group has a finger tree library. What are the use cases for finger trees in clojure? When should finger trees be used instead of one of clojure's other peristent data strucures: vectors, sets, maps, persistentqueues, etc.

The Joy of Clojure mentions that Finger trees can be used for indexed collections where cheap insertions and deletions are required. They have also been described as the "swiss army knife of data structures." Examples of this would be very much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如果没有你 2024-10-05 04:32:42

Ralf Hinze 和 Ross 的论文中描述了 2-3 个手指树帕特森。它们不仅提供了数据结构本身的完整描述,还提供了如何在 Haskell 中使用它的几个示例。他们描述的大多数功能已经在 Clojure 库中提供,但文档还没有。

本周末我将在 Clojure Conj 上介绍 Clojure 手指树。

更新: 现在有一些示例显示在 http:// github.com/clojure/data.finger-tree#readme

更新: 演讲幻灯片:https://github.com/Chouser/talk-finger-tree/blob/master/finger-trees.pdf

更新:演讲视频:http://www.youtube.com/观看?v=UXdr_K0Lwg4

2-3 finger trees are described in a paper by Ralf Hinze and Ross Paterson. They provide not only a complete description of the data structure itself, but several examples of how it can be used ...in Haskell. Most of the features they describe are already available in the Clojure library, but the documentation simply isn't there yet.

I'll be introducing Clojure finger trees at Clojure Conj this weekend.

Update: There are now some examples shown at http://github.com/clojure/data.finger-tree#readme

Update: Slides from the talk: https://github.com/Chouser/talk-finger-tree/blob/master/finger-trees.pdf

Update: Video of the talk: http://www.youtube.com/watch?v=UXdr_K0Lwg4

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文