Download Learn You a Haskell for Great Good!: A Beginner's Guide by Miran Lipovaca PDF

By Miran Lipovaca

Retail reproduction, bought via No Starch

It's all within the identify: Learn You a Haskell for nice Good! is a hilarious, illustrated advisor to this advanced useful language. filled with the author's unique art, popular culture references, and most significantly, important instance code, this ebook teaches practical basics in a manner you by no means inspiration possible.

You'll begin with the child stuff: uncomplicated syntax, recursion, kinds and kind periods. Then as soon as you've bought the fundamentals down, the genuine black belt master-class starts off: you'll discover ways to use applicative functors, monads, zippers, and the entire different legendary Haskell constructs you've purely examine in storybooks.

As you're employed your manner during the author's ingenious (and sometimes insane) examples, you'll examine to:
* giggle within the face of unwanted effects as you wield in simple terms sensible programming techniques
* Use the magic of Haskell's "laziness" to play with countless units of data
* arrange your courses via growing your personal kinds, kind sessions, and modules
* Use Haskell's stylish input/output procedure to proportion the genius of your courses with the skin world

Short of consuming the author's mind, you won't discover a larger strategy to examine this robust language than studying Learn You a Haskell for nice Good!

Show description

Read Online or Download Learn You a Haskell for Great Good!: A Beginner's Guide PDF

Similar programming books

OpenGL ES 2.0 Programming Guide

OpenGL ES 2. zero is the industry’s top software program interface and photos library for rendering subtle 3D photos on hand-held and embedded units. With OpenGL ES 2. zero, the complete programmability of shaders is now to be had on small and transportable devices—including mobile phones, PDAs, consoles, home equipment, and automobiles.

Flow-Based Programming: A New Approach To Application Development (2nd Edition)

Written by way of a pioneer within the box, this can be a thorough advisor to the associated fee- and time-saving merits of Flow-Based Programming. It explains the theoretical underpinnings and alertness of this programming process in sensible phrases. Readers are proven the best way to follow this programming in a couple of parts and the way to prevent universal pitfalls.

Objective-C Quick Syntax Reference

The Objective-C speedy Syntax Reference is a condensed code and syntax connection with the preferred Objective-C programming language, that's the center language at the back of the APIs present in the Apple iOS and Mac OS SDKs. It provides the basic Objective-C syntax in a well-organized layout that may be used as a convenient reference.

Object-Oriented Programming in C++ (4th Edition)

Object-Oriented Programming in C++ starts with the fundamental rules of the C++ programming language and systematically introduces more and more complex themes whereas illustrating the OOP method. whereas the constitution of this publication is identical to that of the former version, each one bankruptcy displays the newest ANSI C++ commonplace and the examples were completely revised to mirror present practices and criteria.

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

Example text

We call that side the hypotenuse. 10] ] We’re drawing from three lists on the right-hand side of the comprehension, and the output expression on the left combines them into a list of triples. If you evaluate triples in GHCi, you’ll get a list that is 1,000 entries long, so we won’t show it here. Next, we’ll filter out triples that don’t represent right triangles by adding a predicate that checks to see if the Pythagorean theorem (a^2 + b^2 == c^2) Starting Out 21 holds. a], a^2 + b^2 == c^2] Notice how we changed the ranges in the lists that we draw values from.

Note that the empty tuple () is also a type, which can have only a single value: (). Type Variables It makes sense for some functions to be able to operate on various types. For instance, the head function takes a list and returns the head element of that list. It doesn’t really matter if the list contains numbers, characters, or even more lists! The function should be able to work with lists that contain just about anything. What do you think the type of the head function is? Let’s check with the :t function: ghci> :t head head :: [a] -> a What is this a?

The type declaration of head states that it takes a list of any type and returns one element of that type. NOTE Although type variables can have names that are longer than one character, we usually give them names like a, b, c, d, and so on. Remember fst? It returns the first item in a pair. Let’s examine its type: ghci> :t fst fst :: (a, b) -> a You can see that fst takes a tuple and returns an element that is of the same type as its first item. That’s why we can use fst on a pair that contains items of any two types.

Download PDF sample

Rated 4.43 of 5 – based on 17 votes