Git Product home page Git Product logo

xebia-functional / second-bridge Goto Github PK

View Code? Open in Web Editor NEW
69.0 56.0 6.0 2.23 MB

Second Bridge is a Swift framework for functional programming. Our goal is to make Swift development on par with other functional languages like Scala by adding new data types, functions and operators.

Home Page: http://47degrees.github.io/second-bridge/

Swift 99.37% Ruby 0.27% Objective-C 0.36%
swift framework functional-programming data-types functions operators swiftz cocoapods

second-bridge's Issues

Thunks syntax/custom operator

In Scala, thunks are represented by the : => syntax, encapsulating a function that takes no parameters and return a value; to achieve lazy input parameters in functions. It would be nice to use custom operators to create thunks easily, so we can have parameters by name in Swift too.

Fix Vector issues with Swift 2.1

Apple has changed the way ArraySlices indices work, so Vector now is having a bad time... Need to take a look at how the slices are being built and figure out a way to handle this new way of handling indices.

Also adding some additional tests to check Vector's data integrity would be nice.

Implementation of Promise

Related to the implementation of Futures (issue 47), it'd be nice to have an implementation for Promises.

Streams - Swiftz to Second Bridge

Take a look at Swiftz's new implementation of Streams and see how we can bring it to Second Bridge data-types and the Traversable/Iterable protocols.

State - Swiftz to Second Bridge

Swiftz has an implementation of the State monad. Take a look at it, and see if it's worthy to add on it (i.e.: Scala has a different syntax, how it behaves with what we have in Second Bridge, etc...)

Add Foldable support to Try

We should take a look on implementing Swiftz's Foldable protocol to Try, or if it doesn't make sense, try to implement it on our own based on a suggestion in this pull request:

#48

myTry fold (fail = (ex) -> T , succ = (result) -> T)

Demo apps showcasing FP in Swift

Playgrounds examples are nice, but it would be great to have some examples of using Functional Programming concepts, immutable data types, combinators, etc... in some real small apps. Maybe have them inside the project as separate folders or something.

Free Monads & Trampolines

For a correct implementation of Futures (based on Scalaz's ones), we need an implementation of Free Monads and Trampolines based on them.

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.