r/purescript • • Jun 15 '21

PureScript Book: Functional Programming Made Easier: A Step-by-Step Guide

I’m excited to announce that I finished my book, Functional Programming Made Easier: A Step-by-Step Guide. By the end of this book, the reader will not only learn Functional Programming, but they will learn PureScript.

https://leanpub.com/fp-made-easier

This book takes the reader from knowing zero about Functional Programming to writing a Full-Stack application using HTTPure on the backend and Halogen 6on the front-end.

Below is a list of some of what’s covered (in no particular order):

  1. Pure Functions

  2. Immutability

  3. Higher-order Functions

  4. Currying

  5. Partial Application

  6. Recursion

  7. Tail Recursion

  8. Pattern Matching

  9. Types

    1. Polymorphic

    2. Monomorphic

    3. Sum

    4. Product

  10. Typeclasses

  11. Multi-parametric Typeclasses

  12. Overlapping Instances

  13. Orphaned Instances

  14. Functional Dependencies

  15. Isomorphisms

  16. Homomorphisms

  17. Abstract Algebra

  18. Magma

  19. Semigroup

    1. Monoid

    2. Group

    3. Abelian Group (aka Commutative Group)

    4. Semiring

    5. Ring and Commutative RingEuclidean Ring

  20. Folds

  21. Algebraic Data Types (ADT)

  22. Functors (Covariant, Contravariant, Invariant)

  23. Functors of Values vs Functions

  24. Bifunctors

  25. Profunctors

  26. Applicative Functors

  27. Traversables

  28. Foldables

  29. Applicative Parsers

  30. Monads

  31. Monadic Parsers

  32. Monad Stacks (aka Monad Transformers)

  33. Category Theory (superficially)

    1. Definition

    2. Hask Category

    3. Functors

    4. Applicative

    5. Kleisli Category

Some of the skills it’ll teach you along the way are:

  1. Interpreting Compiler Errors

  2. Type Holes

  3. Effects (Synchronous and Asynchronous)

  4. AVars and Refs (Managed Global State)

  5. Data Bus

  6. Ajax

  7. JSON Decoding

  8. Foreign Function Interface (FFI)

From the exercises and final project you will learn:

  1. Hash Routing

  2. Static File Servers

  3. CORS

  4. Salt Hashing Passwords

91 Upvotes

30 comments sorted by

View all comments

7

u/mikerob215 Jun 22 '21

Was very excited after seeing this post so I got myself a copy. I'm about 200 pages in and it's just great. The writing is clear and I think the exercises were put in in a way that makes them easy to do and hard to skip. Even though I'm comfortable with beginner level purescript and Haskell, I still took the advice of going through the early chapters anyway and it was totally worth it.

Great job on this, I'd recommend it to anyone who wants to get started with fp.

4

u/imright_anduknowit Jun 22 '21

Comments like these really make my day. Thank you for letting me know. I’m so happy to hear that you’re enjoying and learning from the book. You’ve only begun to scratch the surface. There is so much more that awaits you. Happy learning.