Git Product home page Git Product logo

Comments (8)

anicolaspp avatar anicolaspp commented on June 14, 2024

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.

anicolaspp avatar anicolaspp commented on June 14, 2024

@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.

stew avatar stew commented on June 14, 2024

I think that it should require a Semigroup on A instead of using an HList

from cats-collections.

anicolaspp avatar anicolaspp commented on June 14, 2024

That will work too. I will look into it

from cats-collections.

anicolaspp avatar anicolaspp commented on June 14, 2024

@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.

velvia avatar velvia commented on June 14, 2024

from cats-collections.

anicolaspp avatar anicolaspp commented on June 14, 2024

@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.

larsrh avatar larsrh commented on June 14, 2024

That's great! I'd be happy to take a look at them.

from cats-collections.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.