Code Monkey home page Code Monkey logo

typeclassopedia's Introduction

Typeclassopedia

Gitter Build Status Codacy Badge codecov

This project aims to be a simple implementation of the Typeclassopedia in Scala. (If you find a simpler way to express something then please report it or send a pull request.)

Some people learn better by seeing things in code, with examples, which is why I started doing this. The tests are intended to be examples using typical types like Option and List, but also a custom type, Blub, to show that new types can make use of the type classes defined here.

Read The Road to the Typeclassopedia which I hope will be a gentle introduction to the ideas from examples rather than from theory.

How to Start

I suggest you start with Functor as it is the simplest class to study, then Applicative, Monad, Semigroup and Monoid. Then have a look at Validation which is not part of the Typeclassopedia but it's useful.

Do not start with Category, Arrow or Kleisli unless you've understood the above, your brain with melt and kittens will have their toys taken away. Before attempting to grok Category and its subtypes (Arrow), read Introduction to Category Theory in Scala by Heiko Seeberger.

But before you do any of that, you need to understand type classes in scala.

The tests serve as examples of use.

Exercises

There is only one exercise.

  1. Check out the project
  2. Delete src/main/scala/org/typeclassopedia/std
  3. Delete src/test/scala/org/typeclassopedia/Blub.scala (except for the case class itself)
  4. Make all the tests pass again

Further Reading

Books

Talks

typeclassopedia's People

Contributors

channingwalton avatar philipschwarz avatar gitter-badger avatar

Watchers

James Cloos avatar

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.