Git Product home page Git Product logo

rangechain's People

Contributors

halprin avatar

Watchers

 avatar  avatar

rangechain's Issues

Generics

Transition to generics when Go 1.18 comes out.

Support for Channels

Add support to start a chain from a channel. Also add support for flattening a channel. Also add support for terminating in a channel.

Try using Channels for a Generator

Currently returning a function that subsequently returns next items. Try returning a channel so we can use range on it and write to the channel in the middle of a method.

Allow errors to be bubbled out of the chain

If an error is encountered in a function passed into the chain, what do you do with it? You can't return it currently. Well, lets make it so that an error can be returned. Then, any terminating method also returns an error and/or add an Error() method that returns an error iff any of those previous chain methods returned an error. This would require the error to be persisted across the the chains if it was generated in an earlier link.

Support for Maps

Add support to start a chain from a map. Also add support for flattening maps. Also add support for terminating in a map (maybe we don't make this and just tell people to use Reduce?).

Remove all sub packages and everything into main rangechain package

We have other packages that are only meant to be used internally, but there is nothing to stop external users from using them though. Try these options...

  1. Create the internal package at the top level, and move the intermediate, generator, and helper packages under it. One thing to check, though, is how intermediate will work if it is in internal. How does Link operate? Can an external user still reference that struct? Can an external user even invoke any methods on Link? It's possible it operates similar to an unexported struct that is returned from a constructor function where you can call is methods but can't pass it around into another function because you can't reference the type. Also consider how documentation works because you want godoc documentation to show up for Link. You might need apply the below option just for Link. And MapTuple.
  2. Move everything into the top level rangechain package. This will truly hide everything a way from external users. Perhaps chain parts of the go source code with _. E.g. internal_helper_set.go or some sort.

Support for Arrays

Add support to start a chain from an array (already support the slice). Also add support for flattening arrays. Also add support for terminating in an array.

Rename Repository and Package

Rename this repository to something like range-chain and rename the top-level package something like rangechain. Maybe make the name of the repository also be rangechain so there isn't a difference.

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.