Comments (8)
I could add dietmap[A,B] to store items of type B associated with ranges of type A. I dont think it is a problem. I just need other things committed first.
from cats-collections.
@stew I am going to start working on this. The interesting part is merging two nodes. Each Node needs the Range
and and elements in the range. I am thinking on using shapeless to do this since we don't need to fix a type A
. A Node
could potentially look like this:
case class Node[A <: HList, B](range: Range[B], item: A)
in other words, we could do something like this:
Node(Range(10, 20), 5 :: HNil) +
Node(Range(8, 18, "Hello" :: HNil)
will result in:
Node(Range(9, 20), 5 :: "Hello" :: HNil)
What do you think?
Will that work for you @velvia?
from cats-collections.
I think that it should require a Semigroup on A instead of using an HList
from cats-collections.
That will work too. I will look into it
from cats-collections.
@velvia I have done this and open #94 make sure you look at the commit message to see how to use it.
from cats-collections.
from cats-collections.
@larsrh I am back to write some code for this project. I would like to resubmit some of my old PRs. between @stew and I wrote most of the structures here and I would like to continue with it.
from cats-collections.
That's great! I'd be happy to take a look at them.
from cats-collections.
Related Issues (20)
- 1.0 HOT 11
- remove Discrete typeclass in favor of one of the cats Enumerable typeclasses HOT 6
- Publish artifacts for Scala.js 1 HOT 2
- Migrate from tut to mdoc HOT 1
- Dotty support
- AvlMap alter doesn't remove mapping
- Migrate to sbt-github-actions HOT 3
- Integrate mdoc with sbt-microsites HOT 2
- typelevel.org/cats-collections/ leads to 404 HOT 1
- A flaky test `cats.collections.tests.TreeListSpec`
- Remove Gitter link HOT 1
- Bring back code coverage per PR HOT 2
- 0.9.4 as intermediate release HOT 2
- Migrate to sbt-typelevel HOT 2
- Fix the warnings and enable fatal warnings in CI HOT 1
- Get benchmarks compiling on Scala 3
- Setup for CI release HOT 1
- Build for Scala Native
- Add CHAMP HashMap and HashSet to microsite
- Inconsistent Range behavior when dealing with reverse ranges HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cats-collections.