Learn
Install
Playground
Find A Library
Community
Governance
Blog
Getting Started
Install Scala
Scala IDEs
Learn
Tour of Scala
Scala 3 Book
Scala 2 Book
Online Courses
Scala 3 Migration
What's New?
Migrating From Scala 2
New Features for Scaladoc
Videos and Talks
Tutorials
Getting Started with Scala in IntelliJ
Getting Started with Scala and sbt
Scala for Java Programmers
Scala on Android
Scala with Maven
Using the Scala Toolkit
Reference
Guides & Overviews
Books
Scala FAQ
Scala 2 Language Specification
Scala 3 Language Specification
Scala 3 Language Reference
Scala Contribution Guide
Style Guide
Cheatsheet
Glossary
API
SIPs
Install Scala
Scala IDEs
Tour of Scala
Scala 3 Book
Scala 2 Book
Online Courses
What's New?
Migrating From Scala 2
New Features for Scaladoc
Videos and Talks
Getting Started with Scala in IntelliJ
Getting Started with Scala and sbt
Scala for Java Programmers
Scala on Android
Scala with Maven
Using the Scala Toolkit
Guides & Overviews
Books
Scala FAQ
Scala 2 Language Specification
Scala 3 Language Specification
Scala 3 Language Reference
Scala Contribution Guide
Style Guide
Cheatsheet
Glossary
Tutorials
Reference
API
SIPs
Scala 3 — Book
函数
Language
上一章介绍了 Scala
方法
,本章深入研究
函数
。 涵盖的主题包括匿名函数、函数变量和高阶函数 (HOF),包括如何创建自己的 HOF。
←
previous
next
→
Contributors to this page:
Contents
导言
Scala 3 特性
为什么是 Scala 3 ?
Scala 的味道
Hello, World!
The REPL
变量和数据类型
控制结构
领域建模
方法
头等函数
单例对象
集合
上下文抽象
顶层定义
总结
类型初探
字符串插值
控制结构
领域建模
工具
OOP 领域建模
函数式领域建模
方法
方法特性
main 方法
总结
函数
匿名函数
函数变量
Eta 扩展
高阶函数
自定义 map 函数
创建可以返回函数的方法
总结
打包和导入
Scala 集合
集合类型
集合方法
总结
函数式编程
什么是函数式编程?
不可变值
纯函数
函数是值
函数式错误处理
总结
类型和类型系统
类型推断
泛型
相交类型
联合类型
代数数据类型
型变
不透明类型
结构化类型
依赖函数类型
其他类型
上下文抽象
扩展方法
Given 实例和 Using 语句
上下文绑定
Given 导入
实现类型类
多元相等性
隐式转换
总结
并发
Scala 工具
使用 sbt 构建和测试 Scala 项目
worksheet
与 Java 交互
向 Java 开发者介绍Scala
Scala for JavaScript Developers
Scala for Python Developers
下一步去哪
English
Problem with this page?
Please help us fix it!