Haskell Brain Teasers: Exercise Your Mind
暫譯: Haskell 腦筋急轉彎:鍛鍊你的思維
Skinner, Rebecca, Swaine, Michael, Tebeka, Miki
- 出版商: Pragmatic Bookshelf
- 出版日期: 2026-05-07
- 售價: $1,520
- 貴賓價: 9.8 折 $1,489
- 語言: 英文
- 頁數: 100
- 裝訂: Quality Paper - also called trade paper
- ISBN: 9798888651902
- ISBN-13: 9798888651902
-
相關分類:
Functional-programming
海外代購書籍(需單獨結帳)
相關主題
商品描述
Deepen your Haskell knowledge, sharpen your functional programming skills, and just have fun with 25 functional programming puzzles to tie your brain in knots.
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, and the type system. 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 refactor without fear of the dreaded monomorphism restriction. 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 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, or puzzles based on new extensions like 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.
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.
商品描述(中文翻譯)
加深您的 Haskell 知識,磨練您的函數式程式設計技能,並透過 25 道函數式程式設計謎題來挑戰您的思維。
挑戰並鍛鍊您的函數式程式設計知識,解決這 20 道有趣、奇特且具函數性的謎題,涵蓋 Haskell 程式設計主題,如延遲評估(lazy evaluation)、Haskell 語法、型別類別(type classes)和型別系統。深入了解為什麼 Haskell 會是這樣的語言。構建令人費解的自我參考和循環數據結構,利用 unsafePerformIO 解開現實的縫隙,使用 QualifiedDo 構建增強的 DSL,並在重構時無懼可怕的單型限制(monomorphism restriction)。回顧或了解 Haskell 的常見特性,如一元負號(unary minus)和模式守衛(pattern guards),同時掌握 GHC 9.12 的新語言特性,包括線性箭頭(linear arrows)和或模式(Or Patterns)。
運用強大的技術並識別常見的陷阱,解決五個不同主題領域的棘手謎題。
不要忽視延遲評估的謎題:它們將挑戰您預測依賴於延遲的程式在意想不到的方式下的行為。認為語法和語言擴展的謎題應該很簡單?再想想,因為您將面對一元負號運算子的怪異,或基於新擴展如 QualifiedDo 的謎題。準備好面對有關即時多型(ad-hoc polymorphism)、推導策略和記錄欄位的型別類別謎題。想要更多挑戰?試著將經典的模糊型別謎題與線性型別等進階新特性混合。
在嘗試每個謎題後,閱讀解答以獲得對 Haskell 主要特性的更多見解,並利用參考資料建立閱讀清單,以深入探索語言的新領域。