Coder Social home page Coder Social logo

gofingertree's People

Contributors

alaroldai avatar nshepperd avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gofingertree's Issues

Popr

Implement Popr. Currently included as part of pull request #2. After this, the empty, single, and ftree structures should be usable as deques.

Fold tests

Rewrite the fold tests to use a non-associative operation rather than (+), as the current implementation doesn't test the direction of the fold.

empty.Head and empty.Tail behaviour

@nshepperd - saw your comment in empty.Tailr() - do you think it would make sense for empty.Tailr() to return an empty node, rather than nil? That way we could chain operations together more easily, for example replacing the last element in a sequence could be done with n.Tailr().Pushr(newNode)

Concat

Implement sequence concatenation.
Six major scenarios:

  • (empty) + (empty) => empty
  • (empty) + (single) => return right
  • (empty) + (ftree) => return right
  • (single) + (empty) => return left
  • (single) + (single) => reduces to Pushl or Pushr
  • (single) + (ftree) => reduces to Pushl
  • (ftree) + (empty) => return left
  • (ftree) + (single) => reduces to Pushr
  • (ftree) + (ftree) => Non-trivial.

I'm looking at this now.

Split node, empty, single, and ftree structures into separate files.

At the moment, all of these structures are in fingerTree.go. This refactor will move each structure into it's own file, leaving only the FingerTree interface in fingerTree.go. This also makes room for a wrapper structure to be introduced later.

In addition, the Foldable and Iterable interfaces should be moved into fold.go and tier.go, respectively, and the tests should be split up accordingly.

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.