OnDoc
| sign
in
up
~
pub
|
pdf
txt
html
toc
|
<<
>>
1
~
7
8
9
10
11
12
13
~
145
Table of Contents
Introduction
A First Example
Programming with Actors and Messages
Expressions and Simple Functions
Expressions And Simple Functions
Parameters
Conditional Expressions
Example: Square Roots by Newton's Method
Nested Functions
Tail Recursion
First-Class Functions
Anonymous Functions
Currying
Example: Finding Fixed Points of Functions
Summary
Language Elements Seen So Far
Classes and Objects
Case Classes and Pattern Matching
Case Classes and Case Objects
Pattern Matching
Generic Types and Methods
Type Parameter Bounds
Variance Annotations
Lower Bounds
Least Types
Tuples
Functions
Lists
Using Lists
Definition of class List I: First Order Methods
Example: Merge sort
Definition of class List II: Higher-Order Methods
Summary
For-Comprehensions
The N-Queens Problem
Querying with For-Comprehensions
Translation of For-Comprehensions
For-Loops
Generalizing For
Mutable State
Stateful Objects
Imperative Control Structures
Extended Example: Discrete Event Simulation
Summary
Computing with Streams
Iterators
Iterator Methods
Constructing Iterators
Using Iterators
Lazy Values
Implicit Parameters and Conversions
Hindley/Milner Type Inference
Abstractions for Concurrency
Signals and Monitors
SyncVars
Futures
Parallel Computations
Semaphores
Readers/Writers
Asynchronous Channels
Synchronous Channels
Workers
Mailboxes
Actors