# Awesome

# Learn You a Frege for Great Good!

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

- About this tutorial (no examples)
- So what's Haskell? (no examples)
- What you need to dive in (no examples)

### 2. Starting Out

- Ready, set, go!
- Baby's first functions
- An intro to lists
- Texas ranges
- I'm a list comprehension
- Tuples

### 3. Types and Typeclasses

- Believe the type
- Type variables (no examples)
- Typeclasses 101

### 4. Syntax in Functions

### 5. Recursion

- Hello recursion! (no examples)
- Maximum awesome
- A few more recursive functions
- Quick, sort!
- Thinking recursively (no examples)

### 6. Higher Order Functions

- Curried functions
- Some higher-orderism is in order
- Maps and filters
- Lambdas
- Only folds and horses
- Function application with $
- Function composition

### 7. Modules

### 8. Making Our Own Types and Typeclasses

- Algebraic data types intro
- Record syntax
- Type parameters
- Derived instances
- Type synonyms
- Recursive data structures
- Typeclasses 102
- A yes-no typeclass
- The Functor typeclass
- Kinds and some type-foo

### 9. Input and Output

- Hello, world!
- Files and streams
- Command line arguments
- Randomness
- Bytestrings (omitted:
`String`

is not a synonym of`[Char]`

in Frege) - Exceptions

### 10. Functionally Solving Problems

### 11. Functors, Applicative Functors and Monoids

### 12. A Fistful of Monads

- Getting our feet wet with Maybe
- The Monad type class
- Walk the line
- do notation
- The list monad
- Monad laws

### 13. For a Few Monads More

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

### 14. Zippers

## 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.