Leanpub Header

Skip to main content

Functional Programming for Mortals

with Scalaz

Find out why everybody is talking about functional programming!

"Why not put your energy into Eta?" — Martin Odersky

"Plenty of books we could be recommending of higher quality"impartial community leader

"Please. Stop. Saying. This. Please." — Kelley Robinson

"Didn't read it, but I think it's a good book." a 10x developer

Free With Membership

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
6,715
Readers
354
Pages
About

About

About the Book

This book is for the typical Scala developer, probably with a Java background, who is both sceptical and curious about the Functional Programming (FP) paradigm. This book justifies every concept with practical examples, including writing a web application.

Frequently Asked Questions

Q: How does it compare to the red book?

A: This book is blue.

Q: Where can I buy a physical copy?

A: Hardback books are available at Lulu (and budget Paperbacks too).

Q: Is this suitable for beginners?

A: No, this is an intermediate book. First read Programming in Scala or Essential Scala.

Q: I know Haskell, is this book for me?

A: You're not really the target audience. Also, I am so sorry.

Q: Why is the cover so ugly?

A: Because I love Geometrical Methods of Mathematical Physics.

Share this book

License

Creative Commons Attribution-ShareAlike 4.0 International License

Price

Pick Your Price...

With Membership

Free!

$13.37

You pay

$13.37

Author earns

$9.62

Cause gets

$1.07
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 0)

0
The author will earn $0.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Sam Halliday

Chartered Mathematician, Haskell and Emacs hacker, Free Software / education zealot. Read an interview with Sam by Leanpub.

Leanpub Podcast

Episode 106

An Interview with Sam Halliday

Translations

Translations

Contents

Table of Contents

About This Book

Copyleft Notice

Thanks

Practicalities

1.Introduction

  1. 1.1Abstracting over Execution
  2. 1.2Pure Functional Programming

2.For Comprehensions

  1. 2.1Syntax Sugar
  2. 2.2Unhappy path
  3. 2.3Gymnastics
  4. 2.4Incomprehensible

3.Application Design

  1. 3.1Specification
  2. 3.2Interfaces / Algebras
  3. 3.3Business Logic
  4. 3.4Unit Tests
  5. 3.5Parallel
  6. 3.6Summary

4.Data and Functionality

  1. 4.1Data
  2. 4.2Functionality
  3. 4.3Modelling OAuth2
  4. 4.4Summary

5.Scalaz Typeclasses

  1. 5.1Agenda
  2. 5.2Appendable Things
  3. 5.3Objecty Things
  4. 5.4Mappable Things
  5. 5.5Variance
  6. 5.6Apply and Bind
  7. 5.7Applicative and Monad
  8. 5.8Divide and Conquer
  9. 5.9Plus
  10. 5.10Lone Wolves
  11. 5.11Co-things
  12. 5.12Bi-things
  13. 5.13Summary

6.Scalaz Data Types

  1. 6.1Type Variance
  2. 6.2Evaluation
  3. 6.3Memoisation
  4. 6.4Tagging
  5. 6.5Natural Transformations
  6. 6.6Isomorphism
  7. 6.7Containers
  8. 6.8Collections
  9. 6.9Summary

7.Advanced Monads

  1. 7.1Always in motion is the Future
  2. 7.2Effects and Side Effects
  3. 7.3Stack Safety
  4. 7.4Monad Transformer Library
  5. 7.5A Free Lunch
  6. 7.6Parallel
  7. 7.7IO
  8. 7.8Summary

8.Typeclass Derivation

  1. 8.1Running Examples
  2. 8.2scalaz-deriving
  3. 8.3Magnolia
  4. 8.4Shapeless
  5. 8.5Performance
  6. 8.6Summary

9.Wiring up the Application

  1. 9.1Overview
  2. 9.2Main
  3. 9.3Blaze
  4. 9.4Thank You

Typeclass Cheatsheet

Haskell

  1. Data
  2. Functions
  3. Typeclasses
  4. Records of Functions
  5. Modules
  6. Evaluation
  7. Next Steps

Third Party Licenses

  1. Scala License
  2. Scalaz License

Causes

Causes Supported

Amazon Watch

Amazon Watch AW

Supporting Indigenous Peoples. Protecting the Amazon.

http://amazonwatch.org
Amazon Watch is a nonprofit organization founded in 1996 to protect the rainforest and advance the rights of indigenous peoples in the Amazon Basin. We partner with indigenous and environmental organizations in campaigns for human rights, corporate accountability and the preservation of the Amazon's ecological systems.
We envision a world that honors and values cultural and biological diversity and the critical contribution of tropical rainforests to our planet's life support system. We believe that indigenous self-determination is paramount, and see that indigenous knowledge, cultures and traditional practices contribute greatly to sustainable and equitable stewardship of the Earth. We strive for a world in which governments, corporations and civil society respect the collective rights of indigenous peoples to free, prior and informed consent over any activity affecting their territories and resources. We commit, in the spirit of partnership and mutual respect, to support our indigenous allies in their efforts to protect life, land, and culture in accordance with their aspirations and needs.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub