Зарегистрироваться
Восстановить пароль
FAQ по входу

Penner C. Optics By Example: Functional lenses in Haskell

  • Файл формата pdf
  • размером 8,95 МБ
  • Добавлен пользователем
  • Описание отредактировано
Penner C. Optics By Example: Functional lenses in Haskell
Leanpub, 2020. — 390 p.
A comprehensive example-driven guide to Optics. Examples in Haskell, but adaptable to other languages. Become a data-manipulation wizard using Optics to manipulate data!
Lenses, also known as functional references, are a powerful way of looking at, constructing, and using functions on complex data types. They're also, unfortunately, a very new and complex subject making them challenging to learn. This book takes you from beginner to advanced using Lenses, Traversals, Prisms, and more!
Optics By Example is a one-stop comprehensive guide to mastering Optics in functional programming languages. It covers everything you need to know to go from complete beginner to advanced. Each topic is accompanied by copious examples and exercises!
What are Optics? Optics in its most general sense is a full field of study! In a slightly more concrete sense, optics are a family of tools which are interoperable with one another. Lenses, Folds, Traversals, Prisms and Isos are all types of optics which we’ll explore throughout the book! This isn’t a comprehensive list of all optics, in fact new types are still being discovered all the time! You’ll gain an intuition for what the more general concept of an optic actually is as you learn about each concrete type and begin to understand what they have in common, but to put it in a nutshell: optics are a family of inter-composable combinators for building bidirectional data transformations.
See the Sample for a complete list of chapters, but here are some highlights:
Complete introductions to Lenses, Folds, Traversals, Prisms and Isos
Learn the magic of Indexed optics
Composing Optics
Lenses & Records
Fixing "The Record Problem"
Application design techniques using Classy optics
Breakdowns of laws and limitations for each optic type
Virtual lenses
Validation lenses
A guide to fully polymorphic optics
A guide to "operator-style"
Learn to query, filter, and aggregate data with surgical precision
Learn how to use higher-order optics effectively
Learn to write custom versions of all optics types for your own applications
Manipulate data types with a clean and consistent interface
Learn the monadic DSLs for using lenses in real monad stacks
This book is great as a first guide to optics, as a reference guide for discovering and mastering the optics you need for day-to-day problems, and as a springboard into new ideas and tools which you may not have even heard of.
Obligatory Preamble
Optics
Lenses
Polymorphic Optics
Operators
Folds
Traversals
Indexable Structures
Prisms
Isos
Indexed Optics
Dealing with Type Errors
Optics and Monads
Classy Lenses
JSON
Appendices
Answers to Exercises
Upcoming Chapters
Thanks
  • Чтобы скачать этот файл зарегистрируйтесь и/или войдите на сайт используя форму сверху.
  • Регистрация