- Learn Scala Programming
- Slava Schmidt
- 151字
- 2021-06-10 19:35:48
Deep Dive into Functions
Scala combines both object-oriented and functional programming paradigms. In particular, functions are a first-class language concept. They can be defined in a variety of ways, assigned to variables, passed as parameters, and stored in data structures. Scala gives a lot of flexibility with regard to how these actions can be performed.
We'll start this chapter by looking in detail at different flavors of defining a function. We'll then go on and apply the knowledge about types from the previous chapter to make our functions polymorphic and higher order. We'll study recursion, tail recursion, and trampolining as important aspects of functional programming for the JVM. Finally, we'll evaluate peculiarities related to the fact that functions in Scala are implemented in an object-oriented way.
The following topics will be covered in this chapter:
- Ways to define a function
- Polymorphic functions
- Higher order functions
- Recursion
- Trampolining
- Object-oriented aspects of functions
- 玩轉Scratch少兒趣味編程
- Android Development with Kotlin
- FreeSWITCH 1.6 Cookbook
- 基于差分進化的優化方法及應用
- 征服RIA
- 精通Python自然語言處理
- Java 9模塊化開發:核心原則與實踐
- Scala for Machine Learning(Second Edition)
- Vue.js 2 Web Development Projects
- 編程改變生活:用Python提升你的能力(進階篇·微課視頻版)
- RubyMotion iOS Develoment Essentials
- Mastering Docker
- Mastering Adobe Captivate 7
- 超簡單:用Python讓Excel飛起來(實戰150例)
- 實戰Python網絡爬蟲