Muutke küpsiste eelistusi

E-raamat: Learn You a Haskell for Great Good!

4.31/5 (2757 hinnangut Goodreads-ist)
  • Formaat: EPUB+DRM
  • Ilmumisaeg: 15-Apr-2011
  • Kirjastus: No Starch Press,US
  • Keel: eng
  • ISBN-13: 9781593272951
  • Formaat - EPUB+DRM
  • Hind: 32,03 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: EPUB+DRM
  • Ilmumisaeg: 15-Apr-2011
  • Kirjastus: No Starch Press,US
  • Keel: eng
  • ISBN-13: 9781593272951

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

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!

Arvustused

"The thing that's most impressive about Learn You a Haskell for Great Good! is how well-written it is. This book is just fantastic." Gregory Collins, Google Switzerland

"Managed to walk me through all important Haskell concepts without ever making any of the material sound complicated. A good introduction to functional programming." Marijn Haverbeke, author of Eloquent JavaScript

"This is a fantastic book and I highly recommend it as the first book on Haskelland possibly even the second." Michael Fogus, author of The Joy of Clojure

"A fantastic, fun, thorough introduction to Haskell, spiced up by Miran's great sense of humor and zany illustrations." Brent Yorgey, The Math Less Traveled

"Miran Lipovaa has done a fantastic job of writing a book aimed at beginning Haskell programmers. I like his very straightforward writing style of introducing each topic with the minimum of complexity." Bryan Bell, Math and More

"This is a remarkable book and may be just what this beautiful language was missing." Michael Kohl, Citizen428

"This book is the best way I know to obtain the Haskell foundation you need for fluency." Jeremy Bowers, Jerf.org

"This is a terrific book. It makes what might otherwise seem impenetrable mathy-code and makes it fun and approachable." Simon Reynolds

Introduction xv
So, What's Haskell? xv
What You Need to Dive In xvii
Acknowledgments xviii
1 Starting Out
1(22)
Calling Functions
3(2)
Baby's First Functions
5(2)
An Intro to Lists
7(6)
Concatenation
8(1)
Accessing List Elements
9(1)
Lists Inside Lists
9(1)
Comparing Lists
9(1)
More List Operations
10(3)
Texas Ranges
13(2)
I'm a List Comprehension
15(3)
Tuples
18(5)
Using Tuples
19(1)
Using Pairs
20(1)
Finding the Right Triangle
21(2)
2 Believe The Type
23(12)
Explicit Type Declaration
24(1)
Common Haskell Types
25(1)
Type Variables
26(9)
Type Classes 101
27(1)
The Eq Type Class
28(1)
The Ord Type Class
28(1)
The Show Type Class
29(1)
The Read Type Class
29(2)
The Enum Type Class
31(1)
The Bounded Type Class
31(1)
The Num Type Class
32(1)
The Floating Type Class
32(1)
The Integral Type Class
33(1)
Some Final Notes on Type Classes
33(2)
3 Syntax In Functions
35(16)
Pattern Matching
35(5)
Pattern Matching with Tuples
37(1)
Pattern Matching with Lists and List Comprehensions
38(2)
As-patterns
40(1)
Guards, Guards|
40(2)
where?|
42(3)
where's Scope
44(1)
Pattern Matching with where
44(1)
Functions in where Blocks
45(1)
let It Be
45(3)
let in List Comprehensions
47(1)
let in GHCi
47(1)
case Expressions
48(3)
4 Hello Recursion!
51(8)
Maximum Awesome
52(1)
A Few More Recursive Functions
53(3)
replicate
53(1)
take
54(1)
reverse
55(1)
repeat
55(1)
zip
55(1)
elem
56(1)
Quick, Sortl
56(2)
The Algorithm
56(1)
The Code
57(1)
Thinking Recursively
58(1)
5 Higher-Order Functions
59(28)
Curried Functions
59(4)
Sections
62(1)
Printing Functions
63(1)
Some Higher-Orderism Is in Order
63(3)
Implementing zipWith
64(1)
Implementing flip
65(1)
The Functional Programmer's Toolbox
66(5)
The map Function
66(1)
The filter Function
67(1)
More Examples of map and filter
68(2)
Mapping Functions with Multiple Parameters
70(1)
Lambdas
71(2)
I Fold You So
73(7)
Left Folds with foldl
74(1)
Right Folds with foldr
75(1)
The foldl and foldr 1 Functions
76(1)
Some Fold Examples
76(1)
Another Way to Look at Folds
77(1)
Folding Infinite Lists
78(1)
Scans
79(1)
Function Application with $
80(2)
Function Composition
82(5)
Function Composition with Multiple Parameters
83(1)
Point-Free Style
84(3)
6 Modules
87(22)
Importing Modules
88(2)
Solving Problems with Module Functions
90(8)
Counting Words
90(1)
Needle in the Haystack
91(1)
Caesar Cipher Salad
92(2)
On Strict Left Folds
94(1)
Let's Find Some Cool Numbers
95(3)
Mapping Keys to Values
98(6)
Almost As Good: Association Lists
98(2)
Enter Data.Map
100(4)
Making Our Own Modules
104(5)
A Geometry Module
104(2)
Hierarchical Modules
106(3)
7 Making Our Own Types And Type Classes
109(44)
Defining a New Data Type
109(1)
Shaping Up
110(4)
Improving Shape with the Point Data Type
112(1)
Exporting Our Shapes in a Module
113(1)
Record Syntax
114(3)
Type Parameters
117(5)
Should We Parameterize Our Car?
119(2)
Vector von Doom
121(1)
Derived Instances
122(5)
Equating People
123(1)
Show Me How to Read
124(1)
Order in the Courtl
125(1)
Any Day of the Week
126(1)
Type Synonyms
127(5)
Making Our Phonebook Prettier
128(1)
Parameterizing Type Synonyms
129(1)
Go Left, Then Right
130(2)
Recursive Data Structures
132(6)
Improving Our List
133(2)
Let's Plant a Tree
135(3)
Type Classes 102
138(5)
Inside the Eq Type Class
138(1)
A Traffic Light Data Type
139(1)
Subclassing
140(1)
Parameterized Types As Instances of Type Classes
141(2)
A Yes-No Type Class
143(3)
The Functor Type Class
146(4)
Maybe As a Functor
147(1)
Trees Are Functors, Too
148(1)
Either a As a Functor
149(1)
Kinds and Some Type-Foo
150(3)
8 Input And Output
153(16)
Separating the Pure from the Impure
153(1)
Hello, World!
154(2)
Gluing I/O Actions Together
156(5)
Using let Inside I/O Actions
158(1)
Putting It in Reverse
159(2)
Some Useful I/O Functions
161(6)
putStr
161(1)
putChar
162(1)
print
162(1)
when
163(1)
sequence
164(1)
mapM
165(1)
forever
165(1)
forM
166(1)
I/O Action Review
167(2)
9 More Input And More Output
169(34)
Files and Streams
169(6)
Input Redirection
170(1)
Getting Strings from Input Streams
171(2)
Transforming Input
173(2)
Reading and Writing Files
175(5)
Using the withFile Function
177(1)
It's Bracket Time
178(1)
Grab the Handlesl
179(1)
To-Do Lists
180(4)
Deleting Items
181(2)
Cleaning Up
183(1)
Command-Line Arguments
184(1)
More Fun with To-Do Lists
185(5)
A Multitasking Task List
186(4)
Dealing with Bad Input
190(1)
Randomness
190(8)
Tossing a Coin
193(1)
More Random Functions
194(1)
Randomness and I/O
195(3)
Bytestrings
198(5)
Strict and Lazy Bytestrings
199(2)
Copying Files with Bytestrings
201(2)
10 Functionally Solving Problems
203(14)
Reverse Polish Notation Calculator
203(5)
Calculating RPN Expressions
204(1)
Writing an RPN Function
205(2)
Adding More Operators
207(1)
Heathrow to London
208(9)
Calculating the Quickest Path
209(2)
Representing the Road System in Haskell
211(1)
Writing the Optimal Path Function
212(3)
Getting a Road System from the Input
215(2)
11 Applicative Functors
217(26)
Functors Redux
218(5)
I/O Actions As Functors
218(2)
Functions As Functors
220(3)
Functor Laws
223(4)
Law 1
223(1)
Law 2
224(1)
Breaking the Law
225(2)
Using Applicative Functors
227(11)
Say Hello to Applicative
228(1)
Maybe the Applicative Functor
229(1)
The Applicative Style
230(2)
Lists
232(2)
IO Is An Applicative Functor, Too
234(1)
Functions As Applicatives
235(2)
Zip Lists
237(1)
Applicative Laws
238(1)
Useful Functions for Applicatives
238(5)
12 Monoids
243(24)
Wrapping an Existing Type into a New Type
243(7)
Using newtype to Make Type Class Instances
246(1)
On newtype Laziness
247(2)
type vs. newtype vs. data
249(1)
About Those Monoids
250(3)
The Monoid Type Class
252(1)
The Monoid Laws
253(1)
Meet Some Monoids
253(9)
Lists Are Monoids
253(1)
Product and Sum
254(2)
Any and All
256(1)
The Ordering Monoid
257(3)
Maybe the Monoid
260(2)
Folding with Monoids
262(5)
13 A Fistful Of Monads
267(30)
Upgrading Our Applicative Functors
267(2)
Getting Your Feet Wet with Maybe
269(3)
The Monad Type Class
272(2)
Walk the Line
274(6)
Code, Code, Code
274(2)
I'll Fly Away
276(2)
Banana on a Wire
278(2)
do Notation
280(5)
Do As I Do
282(1)
Pierre Returns
282(2)
Pattern Matching and Failure
284(1)
The List Monad
285(7)
do Notation and List Comprehensions
288(1)
MonadPlus and the guard Function
288(2)
A Knight's Quest
290(2)
Monad Laws
292(5)
Left Identity
293(1)
Right Identity
294(1)
Associativity
294(3)
14 For A Few Monads More
297(46)
Writer? I Hardly Knew Herl
298(12)
Monoids to the Rescue
300(2)
The Writer Type
302(1)
Using do Notation with Writer
303(1)
Adding Logging to Programs
304(2)
Inefficient List Construction
306(1)
Using Difference Lists
307(2)
Comparing Performance
309(1)
Reader? Ugh, Not This Joke Again
310(1)
Functions As Monads
311(2)
The Reader Monad
312(1)
Tasteful Stateful Computations
313(8)
Stateful Computations
314(1)
Stacks and Stones
314(2)
The State Monad
316(2)
Getting and Setting State
318(2)
Randomness and the State Monad
320(1)
Error Error on the Wall
321(2)
Some Useful Monadic Functions
323(9)
liftM and Friends
323(3)
The join Function
326(2)
filterM
328(3)
foldM
331(1)
Making a Safe RPN Calculator
332(3)
Composing Monadic Functions
335(1)
Making Monads
336(7)
15 Zippers
343(20)
Taking a Walk
344(8)
A Trail of Breadcrumbs
346(2)
Going Back Up
348(2)
Manipulating Trees Under Focus
350(1)
Going Straight to the Top, Where the Air Is Fresh and Clean!
351(1)
Focusing on Lists
352(1)
A Very Simple Filesystem
353(5)
Making a Zipper for Our Filesystem
355(2)
Manipulating a Filesystem
357(1)
Watch Your Step
358(2)
Thanks for Readingl
360(3)
Index 363
Miran Lipova?a is a computer science student in Ljubljana, Slovenia. In addition to his passion for Haskell, he enjoys boxing, playing bass guitar, and, of course, drawing. He has a fascination with dancing skeletons and the number 71, and when he walks through automatic doors he pretends that hes actually opening them with his mind.