GithubHelp home page GithubHelp logo

ngracia / map-flatmap-training Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jfcorugedo/map-flatmap-training

0.0 1.0 0.0 58 KB

some useful tests to understand map and flatMap operations over functors and monads

License: The Unlicense

Java 100.00%

map-flatmap-training's Introduction

map-flatMap-training

Some useful tests to understand map and flatMap operations over functors and monads

Introduction

This project contains a test class (MapVsFlatMapTest) that contains a set of tests to understand the behaviour of map, flatMap and the how thery are related.

It uses several types to work on: Optional, List and Futures, just to show that no matter the type your working on, map and flatMap operations do the same thing: a transformation.

This project also contains a test class to go over how to combine futures: CombineRuturesTest.

And what's more it contains another test class (WorkWithFuturesUsingMonadTransormerTest) to get used to the same operations but instead of using raw Scala futures, using the MonadTransformer object.

Finally there is a practical exercise to use the monad transformer to combine several futures to get the final result: SummaryServiceTest and SummaryServiceImpl.

How to start

To start solving the tests, just download master branch and execute tests (using your IDE or mvn test).

If you have trouble solving a test and you're about to give up, you have all the tests solved inside the branch solved.

Good look!!

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.