๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Learn You a Haskell for Great Good! A Beginner's Guide

โœ Scribed by Miran Lipovaฤa


Publisher
No Starch Press
Year
2011
Tongue
English
Leaves
290
Edition
1
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


It's all in the name: Learn You a Haskell for Great Good! is a hilarious, illustrated guide to this complex functional language. Packed with the author's original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fundamentals in a way you never thought possible.You'll start with the kid stuff: basic syntax, recursion, types and type classes. Then once you've got the basics down, the real black belt master-class begins: you'll learn to use applicative functors, monads, zippers, and all the other mythical Haskell constructs you've only read about in storybooks.As you work your way through the author's imaginative (and occasionally insane) examples, you'll learn to: Laugh in the face of side effects as you wield purely functional programming techniques Use the magic of Haskell's "laziness" to play with infinite sets of data Organize your programs by creating your own types, type classes, and modules Use Haskell's elegant input/output system to share the genius of your programs with the outside world Short of eating the author's brain, you will not find a better way to learn this powerful language than reading Learn You a Haskell for Great Good! Excerpt from the Introduction Haskell is fun, and thatโ€™s what itโ€™s all about! This book is aimed at people who have experience programming in imperative languagesโ€”such as C++, Java, and Pythonโ€”and now want to try out Haskell. But even if you donโ€™t have any significant programming experience, Iโ€™ll bet a smart person like you will be able to follow along and learn Haskell. My first reaction to Haskell was that the language was just too weird. But after getting over that initial hurdle, it was smooth sailing. Even if Haskell seems strange to you at first, donโ€™t give up. Learning Haskell is almost like learning to program for the first time all over again. Itโ€™s fun, and it forces you to think differently. NOTE If you ever get really stuck, the IRC channel #haskell on the freenode network is a great place to ask questions. The people there tend to be nice, patient, and understanding. Theyโ€™re a great resource for Haskell newbies. So, What's Haskell? Haskell is a purely functional programming language. In imperative programming languages, you give the computer a sequence of tasks, which it then executes. While executing them, the computer can change state. For instance, you can set the variable a to 5 and then do some stuff that might change the value of a. There are also flow-control structures for executing instructions several times, such as for and while loops. Purely functional programming is different. You donโ€™t tell the computer what to doโ€”you tell it what stuff is. For instance, you can tell the computer that the factorial of a number is the product of every integer from 1 to that number or that the sum of a list of numbers is the first number plus the sum of the remaining numbers. You can express both of these operations as functions. > Read the Introduction (PDF) in its entirety.

โœฆ Table of Contents


[cover]......Page 1
1.2 So what's Haskell?......Page 5
1.3 What you need to dive in......Page 6
2.1 Ready, set, go!......Page 8
2.2 Baby's first functions......Page 11
2.3 An intro to lists......Page 12
2.4 Texas ranges......Page 17
2.5 I'm a list comprehension......Page 18
2.6 Tuples......Page 20
3.1 Believe the type......Page 24
3.3 Typeclasses 101......Page 26
4.1 Pattern matching......Page 31
4.2 Guards, guards!......Page 35
4.3 Where!?......Page 36
4.4 Let it be......Page 38
4.5 Case expressions......Page 40
5.2 Maximum awesome......Page 42
5.3 A few more recursive functions......Page 43
5.4 Quick, sort!......Page 45
5.5 Thinking recursively......Page 47
6.1 Curried functions......Page 48
6.2 Some higher-orderism is in order......Page 50
6.3 Maps and filters......Page 52
6.4 Lambdas......Page 56
6.5 Only folds and horses......Page 57
6.6 Function application with \$......Page 61
6.7 Function composition......Page 62
7.1 Loading modules......Page 65
7.2 Data.List......Page 66
7.3 Data.Char......Page 76
7.4 Data.Map......Page 79
7.5 Data.Set......Page 83
7.6 Making our own modules......Page 85
8.1 Algebraic data types intro......Page 89
8.2 Record syntax......Page 92
8.3 Type parameters......Page 94
8.4 Derived instances......Page 98
8.5 Type synonyms......Page 102
8.6 Recursive data structures......Page 105
8.7 Typeclasses 102......Page 109
8.8 A yes-no typeclass......Page 113
8.9 The Functor typeclass......Page 116
8.10 Kinds and some type-foo......Page 119
9.1 Hello, world!......Page 123
9.2 Files and streams......Page 134
9.3 Command line arguments......Page 145
9.4 Randomness......Page 150
9.5 Bytestrings......Page 157
9.6 Exceptions......Page 160
10.1 Reverse Polish notation calculator......Page 167
10.2 Heathrow to London......Page 171
11.1 Functors redux......Page 179
11.2 Applicative functors......Page 187
11.3 The newtype keyword......Page 200
11.4 Monoids......Page 206
12 A Fistful of Monads......Page 219
12.1 Getting our feet wet with Maybe......Page 220
12.2 The Monad type class......Page 222
12.3 Walk the line......Page 224
12.4 do notation......Page 229
12.5 The list monad......Page 233
12.6 Monad laws......Page 239
13.1 Writer? I hardly know her!......Page 243
13.2 Reader? Ugh, not this joke again.......Page 252
13.3 Tasteful stateful computations......Page 254
13.4 Error error on the wall......Page 260
13.5 Some useful monadic functions......Page 261
13.6 Making monads......Page 272
14.1 Taking a walk......Page 277
14.2 A trail of breadcrumbs......Page 279
14.3 Focusing on lists......Page 283
14.4 A very simple file system......Page 285
14.5 Watch your step......Page 288


๐Ÿ“œ SIMILAR VOLUMES


Learn You a Haskell for Great Good!: A B
โœ Miran Lipovaca ๐Ÿ“‚ Library ๐Ÿ“… 2011 ๐Ÿ› No Starch Press ๐ŸŒ English

It's all in the name: Learn You a Haskell for Great Good! is a hilarious, illustrated guide to this complex functional language. Packed with the author's original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fundamentals in a way you never

Learn You a Haskell for Great Good!: A B
โœ Miran Lipovaca ๐Ÿ“‚ Library ๐Ÿ“… 2011 ๐Ÿ› No Starch Press ๐ŸŒ English

It's all in the name: Learn You a Haskell for Great Good! is a hilarious, illustrated guide to this complex functional language. Packed with the author's original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fundamentals in a way you never

Learn You a Haskell for Great Good!: A B
โœ Miran Lipovaca ๐Ÿ“‚ Library ๐Ÿ“… 2011 ๐Ÿ› No Starch Press ๐ŸŒ English

It's all in the name: Learn You a Haskell for Great Good! is a hilarious, illustrated guide to this complex functional language. Packed with the author's original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fundamentals in a way you never

Learn You a Haskell for Great Good!: A B
โœ Miran Lipovaฤa ๐Ÿ“‚ Library ๐Ÿ“… 2011 ๐Ÿ› No Starch ๐ŸŒ English

<h3>Kurzbeschreibung</h3><p>It's all in the name: Learn You a Haskell for Great Good! is a hilarious, illustrated guide to this complex functional language. Packed with the author's original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fund

Learn You a Haskell for Great Good! A Be
โœ Miran Lipovaca ๐Ÿ“‚ Library ๐Ÿ“… 2011 ๐Ÿ› No Starch Press ๐ŸŒ English

Youll start with the kid stuff: basic syntax, recursion, types and type classes. Then once youve got the basics down, the real black belt master-class begins: youll learn to use applicative functors, monads, zippers, and all the other mythical Haskell constructs youve only read about in storybooks.<

Learn You a Haskell for Great Good!: A B
โœ Miran Lipovaca ๐Ÿ“‚ Library ๐Ÿ“… 2011 ๐Ÿ› No Starch Press ๐ŸŒ English

<DIV><p>It's all in the name: <i>Learn You a Haskell for Great Good!</i> is a hilarious, illustrated guide to this complex functional language. Packed with the author's original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fundamentals in a