- 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
- 高手是如何做產品設計的(全2冊)
- Ext JS Data-driven Application Design
- 3ds Max印象 電視欄目包裝動畫與特效制作
- Arduino機器人系統設計及開發
- Mudbox 2013 Cookbook
- Mastering Embedded Linux Programming
- Java并發實現原理:JDK源碼剖析
- 征服C指針(第2版)
- Java服務端研發知識圖譜
- Spring Web Services 2 Cookbook
- 詩意的邊緣
- Java基礎案例教程(第2版)
- TensorFlow+Keras深度學習算法原理與編程實戰
- AVR單片機C語言應用100例
- Microsoft Team Foundation Server 2015 Cookbook