Coder Social home page Coder Social logo

collection-strawman's Introduction

Collection-Strawman

Join the chat at https://gitter.im/scala/collection-strawman

Prototype improvements for Scala collections.

Use it in your project

We published a 0.1.0 version so that you can experiment with the new design. Note that most of the collection implementations are incomplete!

libraryDependencies += "ch.epfl.scala" %% "collection-strawman" % "0.1.0"

Only Scala 2.12 is supported so far.

We also automatically publish snapshots on Sonatype:

resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies += "ch.epfl.scala" %% "collection-strawman" % "0.2.0-SNAPSHOT"

Implemented collection types

  • List
  • LazyList (aka Stream in 2.12)
  • Queue
  • Stack
  • ArrayOps
  • StringOps
  • ArrayBuffer
  • ListBuffer
  • UnrolledBuffer
  • LinkedList
  • DoubleLinkedList
  • Range / NumericRange
  • Vector
  • HashMap
  • TreeMap
  • IntMap / LongMap (?)
  • ListMap
  • MultiMap
  • HashSet
  • ListSet
  • TreeSet
  • EqSet
  • BitSet
  • View

Implemented operations (on the relevant collection types)

Operations not returning a collection

  • apply
  • contains
  • firstKey
  • forall
  • foreach
  • foldLeft
  • foldRight
  • get
  • head
  • indexWhere
  • isDefinedAt
  • isEmpty / nonEmpty
  • keysIteratorFrom
  • last
  • lastKey
  • mkString
  • size
  • sum
  • to

Transformations to collections having the same element type

  • drop
  • empty
  • filter / filterNot
  • groupBy
  • intersect
  • partition
  • range
  • rangeImpl
  • slice
  • splitAt
  • tail
  • take
  • updated

Transformations to collections that can have a different element type

  • ++ / concat / union
  • flatMap
  • map
  • merged
  • zip

In-place mutating operations

TODO

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.