Lenses for the Mere Mortal: PureScript Edition
Last updated on 2018-03-19
About the Book
This book is based on a theory of why lenses are hard to learn:
- The canonical explanations were written by people suffering from the curse of knowledge: they know too much to understand what beginners don't know.
- The implementation of lenses is immensely clever and perhaps even profound. That's completely irrelevant to beginners, but explanations by people excited by the implementation "infect" explanations for beginners. Beginners do not need to care about those fundamentals until fairly late in their learning.
- The reference implementation of lenses uses operators very heavily. Although there are named functions behind those operators, the operators dominate beginner documentation. That means that an understanding task is coupled with a memorization task. Many people (me!) are not good at memorization.
- The documentation is too scattered. There's no clear through line for beginners to follow, no path that doesn't threaten to suddenly dump the beginner into depths they're not ready to handle.
This book aims to address those problems. It uses a PureScript version of lenses because I happen to be learning PureScript these days. It's probably still useful for people wanting to learn the Haskell version of lenses.
I assume only shallow knowledge of PureScript, roughly equivalent to the three post-Elm introductory chapters in An Outsider's Guide to Statically Typed Functional Programming (not yet published as of March 8 2018, but they will be included in that book's free sample when published.)
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...