- 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
- Git Version Control Cookbook
- MySQL 8從入門到精通(視頻教學版)
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- 軟件測試工程師面試秘籍
- Bootstrap Essentials
- Building a Recommendation Engine with Scala
- Silverlight魔幻銀燈
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- Mastering Linux Network Administration
- H5頁面設計:Mugeda版(微課版)
- VMware虛擬化技術
- JavaCAPS基礎、應用與案例
- C語言開發基礎教程(Dev-C++)(第2版)
- AIRIOT物聯網平臺開發框架應用與實戰
- R用戶Python學習指南:數據科學方法