Haskell Brain Teasers (Pragmatic Bookshelf)

PragmaticBookshelf
Rebecca Skinner @RebeccaSkinner
Series Editor Miki Tebeka @tebeka
Edited by Michael Swaine @michaelswaine
Challenge and exercise your functional programming knowledge by tackling these 20 fun, funky, and functional puzzles on Haskell programming topics such as lazy evaluation, Haskell syntax, type classes, the type system, and popular libraries. Gain new insight into why Haskell is the way it is. Build mind-bending self-referential and circular data structures, unpick the seams of reality with unsafePerformIO, build enhanced DSLs with QualifiedDo, and roll back time with STM. Review or get introduced to Haskell’s common quirks such as the unary minus and pattern guards while mastering newer language features up to GHC 9.12, including linear arrows and Or Patterns.
Employ powerful techniques and recognize common pitfalls as you solve fiendish Haskell puzzles across five different topic areas.
Don’t sleep on the lazy evaluation puzzles: they’ll challenge you to predict the behavior of programs that rely on laziness in unexpected ways. Think syntax and language extensions puzzles should be easy? Think again as you deal with the perversity of the unary minus operator, and puzzles based on new extensions such as QualifiedDo. Prepare to be perplexed with Type Class puzzles on ad hoc polymorphism, deriving strategies, and record fields. Want more? Try mixing classic ambiguous type puzzles with advanced new features like linear types. Want to read and debug more esoteric code and exotic language features? Then take on the Libraries puzzles, designed to challenge beginner and advanced readers as you peer into lenses, step into STM, and test the limits of your understanding with the singletons library.
After trying your hand at each puzzle, read through the solution to get more insight into key Haskell features, and use the references to build a reading list to dive deeper into new areas of the language.
Rebecca Skinner is the author of Effective Haskell, and a software engineer with more than 10 years of experience in Haskell and functional programming across industries including fintech, security, and data science. She currently volunteers as a member of the Haskell.org committee.
- Full details: Haskell Brain Teasers: Exercise Your Mind by Rebecca Skinner
- View this book’s portal and details on how to post errata and suggestions here.
Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout
Latest Threads About This Book

Most Active This Week

Most Active This Month
Most Active This Year
Most Active Last Three Years
Most Active Over Three Years
Latest in Haskell Brain Teasers
Get money off!

The Pragmatic Bookshelf
35% off any eBook
Use the coupon code "devtalk.com" to get 35% off any eBook published by PragProg!