Giter Site home page Giter Site logo

fp's People

Contributors

opeltre avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fp's Issues

Docs

Keep track of the documentation here:

๐Ÿ†— fill the index and make it friendly

  • ๐Ÿ“ฆ install with pip install funprogram โœจ
  • ๐Ÿ“ the manual will get you started with the basics of fp ๐Ÿ›ฉ๏ธ
  • ๐Ÿ“š the docstrings for any deeper understanding of the internals! โš™๏ธ

๐Ÿž Finish the manual

  • ๐Ÿ†— The Type Category
  • ๐Ÿž Functor and Monads
  • ๐Ÿž The Tens Category

Casts

Do not cast automatically, or at least not with python builtins.

Right now, anything in Show i.e. implementing __repr__ is cast to string, and the following is accepted:

f = Arrow(str, int)(len)
f([0, 1, 2, 3])
#out: length of string representation

Curry

Implement:

curry   :: ((a, b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> (a, b) -> c

As methods of the Arrow class.

Then, given arity of function f, return partial application (slice) of f with smaller number of arguments.

To do this properly, we should have product types, so that:

Arrow(A * B, C) ~ Arrow(A, Arrow(B, C))

And arity 2 is infered from the input type A * B.

Uncurry

Curryfication works well by inheritance from ArrowMeta with 28bc2da

=> Implement Arrow.uncurry for (recursively) unfolding tgt attribute when tgt = Arrow(B, C) !

Multilinear instances

Support tuple of shapes input when creating Linear instances.

Contracting against n vectors is lighter than applying a flattened matrix to the tensor product.

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.