Skip to content

Frege Translation of "Learn You a Haskell for Great Good!."

Notifications You must be signed in to change notification settings

y-taka-23/learn-you-a-frege

Repository files navigation

Learn You a Frege for Great Good!

Build Status

Frege implementation of examples in the book "Learn You a Haskell for Great Good!". See also LYAH adaptions for Frege in the official wiki.

Table of Contents

1. Introduction

  1. About this tutorial (no examples)
  2. So what's Haskell? (no examples)
  3. What you need to dive in (no examples)

2. Starting Out

  1. Ready, set, go!
  2. Baby's first functions
  3. An intro to lists
  4. Texas ranges
  5. I'm a list comprehension
  6. Tuples

3. Types and Typeclasses

  1. Believe the type
  2. Type variables (no examples)
  3. Typeclasses 101

4. Syntax in Functions

  1. Pattern matching
  2. Guards, guards!
  3. Where!?
  4. Let it be
  5. Case expressions

5. Recursion

  1. Hello recursion! (no examples)
  2. Maximum awesome
  3. A few more recursive functions
  4. Quick, sort!
  5. Thinking recursively (no examples)

6. Higher Order Functions

  1. Curried functions
  2. Some higher-orderism is in order
  3. Maps and filters
  4. Lambdas
  5. Only folds and horses
  6. Function application with $
  7. Function composition

7. Modules

  1. Loading modules
  2. Data.List
  3. Data.Char
  4. Data.Map
  5. Data.Set
  6. Making our own modules

8. Making Our Own Types and Typeclasses

  1. Algebraic data types intro
  2. Record syntax
  3. Type parameters
  4. Derived instances
  5. Type synonyms
  6. Recursive data structures
  7. Typeclasses 102
  8. A yes-no typeclass
  9. The Functor typeclass
  10. Kinds and some type-foo

9. Input and Output

  1. Hello, world!
  2. Files and streams
  3. Command line arguments
  4. Randomness
  5. Bytestrings (omitted: String is not a synonym of [Char] in Frege)
  6. Exceptions

10. Functionally Solving Problems

  1. Reverse Polish notation calculator
  2. Heathrow to London

11. Functors, Applicative Functors and Monoids

  1. Functors redux
  2. Applicative functors
  3. The newtype keyword
  4. Monoids

12. A Fistful of Monads

  1. Getting our feet wet with Maybe
  2. The Monad type class
  3. Walk the line
  4. do notation
  5. The list monad
  6. Monad laws

13. For a Few Monads More

  1. Writer? I hardly know her!
  2. Reader? Ugh, not this joke again.
  3. Tasteful stateful computations
  4. Error error on the wall
  5. Some useful monadic functions
  6. Making monads

14. Zippers

  1. Taking a walk
  2. A trail of breadcrumbs
  3. Focusing on lists
  4. A very simple file system
  5. Watch your step

How to Build

The project is built by Gradle and Frege Gradle Plugin. The Gradle wrapper is already committed in the repository, so what you have to do is execute:

$ ./gradlew compileFrege

Then you can find the generated .java and .class files under the build/classes/main directory.

License

This work is highly inspired by "Learn You a Haskell for Great Good!", and licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License, just like the original.

CC BY-NC-SA

About

Frege Translation of "Learn You a Haskell for Great Good!."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages