Giter Site home page Giter Site logo

fp-patterns's Introduction

Functional Programming Patterns Tutorial

A tutorial and simple learning platform for studying basic functional patterns.

Getting started

Prerequisites

You'll need Java and Git.

Running

  • Make sure that the ports 8000, 8001, 2552 and 2553 are available.

  • Run ./meditate <spec> (use meditate.bat on Windows) from the command line at the root of the repo. Here <spec> is the class name of a specification, for example Options. Currently there are specs for Options, Eithers, Lists, Leo and Futures.

  • Open your browser to localhost:8000, and select the tutorial matching the specification for your meditate command.

  • In the specification (found in specs/src/test/scala), replace the placeholder symbols (__) with code that completes the example. As you complete examples, the web page will give you feedback in real time, and reveal more content for reading.

  • When you complete a tutorial (like Options), terminate the meditate process running in the console simply by pressing enter (on Windows, close both opened command prompt windows). To start with the next tutorial, run the corresponding meditate command.

Note that compile errors in the specification will not be relayed to the web page. Keep an eye on the console window where you run the specs. If there are compile errors, use the compiler's error messages to help you fix them as usual.

fp-patterns's People

Contributors

seance avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fp-patterns's Issues

Either and anInstanceOf checks

This should be correct, around line 37, right?

"Use the 'right' method to get a Right projection" ! {
    e1.right must be (anInstanceOf[Either.RightProjection[String, Int]])
}

However, I get

'RightProjection(Right(5))' is not the same as 'org.specs2.matcher.AnyBaseMatchers$$anon$9@7ce69957'

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.