Email the Author

You can use this page to email Brian Marick about Lenses for the Mere Mortal: PureScript Edition.

Please include an email address so the author can respond to your query

This message will be sent to Brian Marick

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

About the Book

Three things about this book make it a novelty among lens tutorials:

  1. Explanations are driven not by lens types, but by the types of data you want to use lenses on. Consider Maps. Most lens tutorials don't cover them. (I'm not sure I've found any that do.) Once you've learned lenses well, it's relatively easy to deduce how to use them with Maps. But if you try to use lenses on Maps before then, you will suffer. Which seems wrong, given how common Maps are in code. So this book covers them in chapter 2.
  2. I wrote the book as I was learning lenses and applying them to my own code. That gives me a better idea of what novices will stumble over (Maps! Error messages!) and allows me to introduce topics in something like a "just in time" order. To the best of my ability, the book represents what I'd have wished my learning experience to be: answers coming just as I was getting puzzled, answers that don't overwhelm me with completeness or detail I'm unprepared for, and so on. This isn't the first time I've written in this style, and it turns out that my ideal learning journey works for other people.
  3. It's a book. That means it can take its time. It doesn't have to leave things for you to figure out from API documentation.

There are other differences, but I'll leave them to the Introduction.

The book uses a PureScript version of lenses because I happened to be learning PureScript when I got the idea of writing it. I hope it's still useful for people wanting to learn the Haskell version. (The two APIs are very similar, though the underlying implementations differ in some important ways.)

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.


About the Author

Brian Marick’s avatar Brian Marick

@marick

Brian Marick was first exposed to the functional style in 1983, when the accident of knowing a little bit of Lisp tossed him into the job of technical lead on a project to port Common Lisp to a now-defunct computer architecture. That led him to a reading spree about all things Lisp, the language from which the functional style arguably originated. He’s been a language geek ever since, despite making most of his living as a software process consultant. He’s the author of the popular Midje testing library for Clojure and has written books (Everyday Scripting with Ruby, Programming Cocoa with Ruby, and Functional Programming for the Object-Oriented Programmer). The two books in progress are An Outsider's Guide to Statically Typed Functional Programming and Lenses for the Mere Mortal.

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • Lenses › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • TranslateAI
    • TranslateWord
    • TranslateEPUB
    • PublishWord
    • Publish on Amazon
    • CourseAI
    • GlobalAuthor
    • Marketing Packages
    • IndexAI
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss