Finding Success (and Failure) in Haskell: Fall in love with applicative functors

Автор: literator от 4-01-2021, 20:53, Коментариев: 0

Категория: КНИГИ » ПРОГРАММИРОВАНИЕ

Finding Success (and Failure) in Haskell: Fall in love with applicative functorsНазвание: Finding Success (and Failure) in Haskell: Fall in love with applicative functors
Автор: Julie Moronuki, Chris Martin
Издательство: Leanpub
Год: 2019
Страниц: 206
Язык: английский
Формат: pdf (true), mobi, epub
Размер: 10.1 MB

Grab your compiler and follow along as the authors develop and gradually refine a short Haskell program. This extremely approachable guide explains topics like case expressions, sum and product types, type constructors, typeclasses, and newtype coercion as they are motivated by the example code, with exercises to reinforce your understanding.

Julie originally planned this course and taught a version of it at the Austin Haskell Meetup. The group had, by then, learned about monads and applicatives and how typeclasses work and all that good stuff, but it wasn't yet clear and concrete to them. It's one thing to talk about an idea and another to make use of it, so this series of lessons was planned to understand some things about monads and applicatives by using them. We started with a basic problem to solve – validating some user inputs – wrote a few basic functions and, over the course of a few hours, refactored it to use different types. Some of those types are monads, and some are not, and we were able to reach a concrete understanding of why and why not.

We've since revised and refined the course and edited the code to illustrate several additional core Haskell concepts while still being able to introduce them one at a time, to keep things tractable. By starting with basic language concepts (if-then-else and case) and growing a single example gradually, we made a book that is accessible to beginners, practical, and helpful to anyone who wants to get started writing programs in Haskell.

Programmers ask Why monads? This is why: the monad class is our tool for generalizing the notion of “program” beyond “run a series of subprograms until one fails.” There is a whole world of other kinds of programs; in this book, we are concerned with programs for which the execution model is “run all of the subprograms, and if any of them fail, produce a list of all of the failures.” Once we understand how the Monad and Applicative classes generalize programs, the solution to our problem falls almost effortlessly into our lap.

This book is for people who have just started getting into Haskell but would like to move quickly and understand by doing. We assume very little prior knowledge of Haskell. We work through examples without understanding theory or how and why things work too deeply. We give just enough information, just at the time when you need it.

Скачать Finding Success (and Failure) in Haskell: Fall in love with applicative functors








Нашел ошибку? Есть жалоба? Жми!
Пожаловаться администрации
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.