内容提要:
If you have an imperative (and probably object-oriented) programming background, this hands-on book will guide you through the alien world of functional programming. Author Joshua Backfield begins slowly by showing you how to apply the most useful implementation concepts before taking you further into functional-style concepts and practices.In each chapter, you’ll learn a functional concept and then use it to refactor the fictional Xxy company’s imperative-style legacy code, writing and testing the functional code yourself. As you progress through the book, you’ll migrate from Java 7 to Groovy and finally to Scala as the need for better functional language support gradually increases.
- Learn why today’s finely tuned applications work better with functional code
- Transform imperative-style patterns into functional code, following basic steps
- Get up to speed with Groovy and Scala through examples
- Understand how first-class functions are passed and returned from other functions
- Convert existing methods into pure functions, and loops into recursive methods
- Change mutable variables into immutable variables
- Get hands-on experience with statements and nonstrict evaluations
- Use functional programming alongside object-oriented design
ISBN:1449368174
年份:2014
总页数:152
语言:English
文件大小:7.15 MB
文件格式:PDF
下载:关注本站公众号(右侧二维码),在 个性化-联系客服 中输入本文链接可获取文件下载链接。