FingerTree | Scala implementation of the versatile | Functional Programming library
kandi X-RAY | FingerTree Summary
kandi X-RAY | FingerTree Summary
A Scala implementation of the versatile purely functional data structure of the same name.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FingerTree
FingerTree Key Features
FingerTree Examples and Code Snippets
import de.sciss.fingertree._
val sq = RangedSeq(
(1685, 1750) -> "Bach",
(1866, 1925) -> "Satie",
(1883, 1947) -> "Russolo",
(1883, 1965) -> "Varèse",
(1910, 1995) -> "Schaeffer",
(1912, 1992) -> "Cage"
)(_._1, Ordering
import de.sciss.fingertree._
val sym = Seq(("Cs", 55), ("Fr", 87), ("K", 19), ("Li", 3), ("Na", 11), ("Rb", 37))
val sq = OrderedSeq(sym: _*)(_._2, Ordering.Int)
val li = sq.toList // List((Li,3), (Na,11), (K,19), (Rb,37), (Cs,55), (Fr,87))
val ce
import de.sciss.fingertree._
implicit val m = Measure.SummedIntInt
val sq = IndexedSummedSeq[Int,Int]((1 to 10).map(i => i * i): _*)
sq.sum // result: 385
sq.sumUntil(sq.size/2) // result: 55
Community Discussions
Trending Discussions on FingerTree
QUESTION
I was just reading Apfelmus' excellent introduction to Finger Trees for the second time and started to wonder about his implementation of head:
...ANSWER
Answered 2019-May-09 at 14:30Yes, head
and head'
should have the same time complexity if handed to GHC. I would expect a small constant-factor difference in favor of head
(maybe 60% confident of this -- the list fusion optimization stuff is pretty wild when it works).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FingerTree
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page