Giter Site home page Giter Site logo

monads's Introduction

Monads (and other Functional Structures)

This repository is meant to accompany the Monads Series on the Monday Morning Haskell blog. Each article in the series has one of two corresponding modules in this repository. Any module with "Complete" in its name is meant mostly as a reference. You can read the code along with the article and see the finished product. The other modules (for example Functors and MonadsBasic) also follow the same code examples, but some parts are left undefined with a "TODO" marker, so you can write the code in for yourself!

Repository Instructions

Start by building the code:

stack build

Then, you can open up the exercise in one window and bring up GHCI in another to follow along. There's some overlap in variable names, so you should start your GHCI session by clearing the module list:

>> stack ghci
>> :l

Then you can load the module you're working with, and try out the different expressions!

>> :l ReaderWriter
>> acc1 "Hello"
(2, "lloHH")
>> acc1'
(undefined)

The acc1' function is undefined. So you can then modify it and use :r to reload the module!

>> :r
>> acc1' "Hello"
("lloHH", 2)

Full Module List

  1. Part 1: Functors, FunctorsComplete
  2. Part 2: ApplicativesComplete (All coding can be done in GHCI)
  3. Part 3: MonadsBasic, MonadsBasicComplete
  4. Part 4: ReaderWriter, ReaderWriterComplete
  5. Part 5: State, StateComplete
  6. Part 6: Transformers, TransformersComplete
  7. Part 7: LawsComplete (One small coding addition you can make)

monads's People

Contributors

jhb563 avatar ntreu14 avatar

Watchers

 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.