Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/y-taka-23/learn-you-a-frege

Frege Translation of "Learn You a Haskell for Great Good!."
https://github.com/y-taka-23/learn-you-a-frege

Last synced: about 1 month ago
JSON representation

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

Lists

README

        

# Learn You a Frege for Great Good!

[![Build Status](https://travis-ci.org/y-taka-23/learn-you-a-frege.svg?branch=master)](https://travis-ci.org/y-taka-23/learn-you-a-frege)

[Frege](https://github.com/Frege/frege) implementation of examples in the book ["Learn You a Haskell for Great Good!"](http://learnyouahaskell.com/). See also [LYAH adaptions for Frege](https://github.com/Frege/frege/wiki/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!](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter02/ReadySetGo.fr)
2. [Baby's first functions](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter02/BabysFirstFunctions.fr)
3. [An intro to lists](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter02/AnIntroToLists.fr)
4. [Texas ranges](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter02/TexasRanges.fr)
5. [I'm a list comprehension](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter02/ImAListComprehension.fr)
6. [Tuples](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter02/Tuples.fr)

### 3. Types and Typeclasses

1. [Believe the type](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter03/BelieveTheType.fr)
2. Type variables (no examples)
3. [Typeclasses 101](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter03/Typeclasses101.fr)

### 4. Syntax in Functions

1. [Pattern matching](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter04/PatternMatching.fr)
2. [Guards, guards!](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter04/GuardsGuards.fr)
3. [Where!?](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter04/Where.fr)
4. [Let it be](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter04/LetItBe.fr)
5. [Case expressions](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter04/CaseExpressions.fr)

### 5. Recursion

1. Hello recursion! (no examples)
2. [Maximum awesome](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter05/MaximumAwesome.fr)
3. [A few more recursive functions](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter05/AFewMoreRecursiveFunctions.fr)
4. [Quick, sort!](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter05/QuickSort.fr)
5. Thinking recursively (no examples)

### 6. Higher Order Functions

1. [Curried functions](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter06/CurriedFunctions.fr)
2. [Some higher-orderism is in order](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter06/SomeHigherOrderismIsInOrder.fr)
3. [Maps and filters](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter06/MapsAndFilters.fr)
4. [Lambdas](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter06/Lambdas.fr)
5. [Only folds and horses](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter06/OnlyFoldsAndHorses.fr)
6. [Function application with $](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter06/FunctionApplicationWithDollar.fr)
7. [Function composition](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter06/FunctionComposition.fr)

### 7. Modules

1. [Loading modules](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter07/LoadingModules.fr)
2. [Data.List](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter07/DataList.fr)
3. [Data.Char](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter07/DataChar.fr)
4. [Data.Map](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter07/DataMap.fr)
5. [Data.Set](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter07/DataSet.fr)
6. [Making our own modules](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter07/MakingOurOwnModules.fr)

### 8. Making Our Own Types and Typeclasses

1. [Algebraic data types intro](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/AlgebraicDataTypesIntro.fr)
2. [Record syntax](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/RecordSyntax.fr)
3. [Type parameters](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/TypeParameters.fr)
4. [Derived instances](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/DerivedInstances.fr)
5. [Type synonyms](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/TypeSynonyms.fr)
6. [Recursive data structures](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/RecursiveDataStructures.fr)
7. [Typeclasses 102](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/Typeclasses102.fr)
8. [A yes-no typeclass](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/AYesNoTypeclass.fr)
9. [The Functor typeclass](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/TheFunctorTypeclass.fr)
10. [Kinds and some type-foo](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter08/KindsAndSomeTypeFoo.fr)

### 9. Input and Output

1. [Hello, world!](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter09/HelloWorld.fr)
2. [Files and streams](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter09/FilesAndStreams.fr)
3. [Command line arguments](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter09/CommandLineArguments.fr)
4. [Randomness](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter09/Randomness.fr)
5. Bytestrings (omitted: `String` is not a synonym of `[Char]` in Frege)
6. [Exceptions](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter09/Exceptions.fr)

### 10. Functionally Solving Problems

1. [Reverse Polish notation calculator](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter10/ReversePolishNotationCalculator.fr)
2. [Heathrow to London](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter10/HeathrowToLondon.fr)

### 11. Functors, Applicative Functors and Monoids

1. [Functors redux](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter11/FunctorsRedux.fr)
2. [Applicative functors](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter11/ApplicativeFunctors.fr)
3. [The newtype keyword](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter11/TheNewtypeKeyword.fr)
4. [Monoids](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter11/Monoids.fr)

### 12. A Fistful of Monads

1. [Getting our feet wet with Maybe](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter12/GettingOurFeetWetWithMaybe.fr)
2. [The Monad type class](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter12/TheMonadTypeClass.fr)
3. [Walk the line](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter12/WalkTheLine.fr)
4. [do notation](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter12/DoNotation.fr)
5. [The list monad](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter12/TheListMonad.fr)
6. [Monad laws](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter12/MonadLaws.fr)

### 13. For a Few Monads More

1. [Writer? I hardly know her!](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter13/WriterIHardlyKnowHer.fr)
2. [Reader? Ugh, not this joke again.](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter13/ReaderUghNotThisJokeAgain.fr)
3. [Tasteful stateful computations](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter13/TastefulStatefulComputations.fr)
4. [Error error on the wall](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter13/ErrorErrorOnTheWall.fr)
5. [Some useful monadic functions](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter13/SomeUsefulMonadicFunctions.fr)
6. [Making monads](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter13/MakingMonads.fr)

### 14. Zippers

1. [Taking a walk](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter14/TakingAWalk.fr)
2. [A trail of breadcrumbs](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter14/ATrailOfBreadcrumbs.fr)
3. [Focusing on lists](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter14/FocusingOnLists.fr)
4. [A very simple file system](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter14/AVerySimpleFileSystem.fr)
5. [Watch your step](https://github.com/y-taka-23/learn-you-a-frege/blob/master/src/main/frege/learnyou/chapter14/WatchYourStep.fr)

## How to Build

The project is built by Gradle and [Frege Gradle Plugin](https://github.com/Frege/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!"](http://learnyouahaskell.com/), and licensed under the [Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License](http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode), just like the original.

[![CC BY-NC-SA](https://licensebuttons.net/l/by-nc-sa/3.0/88x31.png "CC BY-NC-SA")](http://creativecommons.org/licenses/by-nc-sa/3.0/)