Scala By Example (Scala qua ví dụ) - Martin Odersky
- Pages
- 145
- Format
- Taille
- 866 KB
- Langue
- EN
- Année
- 2011
- Vues
- 0
- Commentaires
- 0
- Lượt tải
- 0
Giáo trình giới thiệu ngôn ngữ lập trình Scala qua các ví dụ, bao gồm các khái niệm cơ bản và nâng cao như hàm, lớp, danh sách, kiểu generic, xử lý đồng thời.
Foire aux questions
Ce document est-il gratuit ?
Oui. « Scala By Example (Scala qua ví dụ) - Martin Odersky » est gratuit — il suffit de vous connecter et de cliquer sur Télécharger pour obtenir le fichier original.
Combien de pages compte ce document ?
Le document contient 145 pages. Vous pouvez le prévisualiser en ligne avant de le télécharger.
Puis-je prévisualiser avant de télécharger ?
Oui. Vous pouvez prévisualiser ce document directement sur cette page avec le lecteur en ligne, puis décider de le télécharger ou non.
- Nom du document
- Scala By Example (Scala qua ví dụ) - Martin Odersky
- Auteur (dans le document)
- Martin Odersky
- Contenu
- Tài liệu 'Scala By Example' là một bản nháp giới thiệu ngôn ngữ lập trình Scala thông qua các ví dụ thực tế. Nó bao gồm các chủ đề từ cơ bản như biểu thức và hàm đến các khái niệm nâng cao như Actors, kiểu dữ liệu chung và tính đồng thời.
- Table des matières
- 4.1 Expressions And Simple Functions
- 4.2 Parameters
- 4.3 Conditional Expressions
- 4.4 Example: Square Roots by Newton’s Method
- 4.5 Nested Functions
- 4.6 Tail Recursion
- 5.1 Anonymous Functions
- 5.2 Currying
- 5.3 Example: Finding Fixed Points of Functions
- 5.4 Summary
- 5.5 Language Elements Seen So Far
- 7.1 Case Classes and Case Objects
- 7.2 Pattern Matching
- 8.1 Type Parameter Bounds
- 8.2 Variance Annotations
- 8.3 Lower Bounds
- 8.4 Least Types
- 8.5 Tuples
- 8.6 Functions
- 9.1 Using Lists
- 9.2 Definition of class List I: First Order Methods
- 9.3 Example: Merge sort
- 9.4 Definition of class List II: Higher-Order Methods
- 9.5 Summary
- 10.1 The N-Queens Problem
- 10.2 Querying with For-Comprehensions
- 10.3 Translation of For-Comprehensions
- 10.4 For-Loops
- 10.5 Generalizing For
- 11.1 Stateful Objects
- 11.2 Imperative Control Structures
- 11.3 Extended Example: Discrete Event Simulation
- 11.4 Summary
- 13.1 Iterator Methods
- 13.2 Constructing Iterators
- 13.3 Using Iterators
- 17.1 Signals and Monitors
- 17.2 SyncVars
- 17.3 Futures
- 17.4 Parallel Computations
- 17.5 Semaphores
- 17.6 Readers/Writers
- 17.7 Asynchronous Channels
- 17.8 Synchronous Channels
- 17.9 Workers
- 17.10Mailboxes
- 17.11Actors
- Chapter
- Pages
- 145 pages
- Téléversé par
- lienhejb
Génération de l'aperçu...
Description
Scala By Example DRAFT May 24, 2011 Martin Odersky P ROGRAMMING M ETHODS L ABORATORY EPFL S WITZERLAND Contents 1 Introduction 1 2 A First Example 3 3 Programming with Actors and Messages 7 4 Expressions and Simple Functions 11 4.1 Expressions And Simple Functions . . . . . . . . . . . . . . . . . . . . . . 11 4.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.3 Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.4 Example: Square Roots by Newton’s Method . . . . . . . . . . . . . . . . 15 4.5 Nested Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.6 Tail Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5 First-Class Functions 21 5.1 Anonymous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.2 Currying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.3 Example: Finding Fixed Points of Functions . . . . . . . . . . . . . . . . 25 5.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.5 Language Elements Seen So Far . . . . . . . . . . . . . . . . . . . . . . . 28 6 Classes and Objects 31 7 Case Classes and Pattern Matching 43 7.1 Case Classes and Case Objects . . . . . . . . . . . . . . . . . . . . . . . . 46 7.2 Pattern Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 8 Generic Types and Methods 51 8.1 Type Parameter Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 8.2 Variance Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 iv CONTENTS 8.3 Lower Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.4 Least Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.5 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 8.6 Functions . . . . . . . . . . . . . . . . . .
Scala By Example (Scala qua ví dụ) - Martin Odersky
Génération de l'aperçu...
Scala By Example DRAFT May 24, 2011 Martin Odersky P ROGRAMMING M ETHODS L ABORATORY EPFL S WITZERLAND Contents 1 Introduction 1 2 A First Example 3 3 Programming with Actors and Messages 7 4 Expressions and Simple Functions 11 4.1 Expressions And Simple Functions . . . . . . . . . . . . . . . . . . . . . . 11 4.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.3 Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.4 Example: Square Roots by Newton’s Method . . . . . . . . . . . . . . . . 15 4.5 Nested Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.6 Tail Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5 First-Class Functions 21 5.1 Anonymous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.2 Currying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.3 Example: Finding Fixed Points of Functions . . . . . . . . . . . . . . . . 25 5.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.5 Language Elements Seen So Far . . . . . . . . . . . . . . . . . . . . . . . 28 6 Classes and Objects 31 7 Case Classes and Pattern Matching 43 7.1 Case Classes and Case Objects . . . . . . . . . . . . . . . . . . . . . . . . 46 7.2 Pattern Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 8 Generic Types and Methods 51 8.1 Type Parameter Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 8.2 Variance Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 iv CONTENTS 8.3 Lower Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.4 Least Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.5 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 8.6 Functions . . . . . . . . . . . . . . . . . .
Lire le document entier
- Nom du document
- Scala By Example (Scala qua ví dụ) - Martin Odersky
- Auteur (dans le document)
- Martin Odersky
- Contenu
- Tài liệu 'Scala By Example' là một bản nháp giới thiệu ngôn ngữ lập trình Scala thông qua các ví dụ thực tế. Nó bao gồm các chủ đề từ cơ bản như biểu thức và hàm đến các khái niệm nâng cao như Actors, kiểu dữ liệu chung và tính đồng thời.
- Table des matières
- 4.1 Expressions And Simple Functions
- 4.2 Parameters
- 4.3 Conditional Expressions
- 4.4 Example: Square Roots by Newton’s Method
- 4.5 Nested Functions
- 4.6 Tail Recursion
- 5.1 Anonymous Functions
- 5.2 Currying
- 5.3 Example: Finding Fixed Points of Functions
- 5.4 Summary
- 5.5 Language Elements Seen So Far
- 7.1 Case Classes and Case Objects
- 7.2 Pattern Matching
- 8.1 Type Parameter Bounds
- 8.2 Variance Annotations
- 8.3 Lower Bounds
- 8.4 Least Types
- 8.5 Tuples
- 8.6 Functions
- 9.1 Using Lists
- 9.2 Definition of class List I: First Order Methods
- 9.3 Example: Merge sort
- 9.4 Definition of class List II: Higher-Order Methods
- 9.5 Summary
- 10.1 The N-Queens Problem
- 10.2 Querying with For-Comprehensions
- 10.3 Translation of For-Comprehensions
- 10.4 For-Loops
- 10.5 Generalizing For
- 11.1 Stateful Objects
- 11.2 Imperative Control Structures
- 11.3 Extended Example: Discrete Event Simulation
- 11.4 Summary
- 13.1 Iterator Methods
- 13.2 Constructing Iterators
- 13.3 Using Iterators
- 17.1 Signals and Monitors
- 17.2 SyncVars
- 17.3 Futures
- 17.4 Parallel Computations
- 17.5 Semaphores
- 17.6 Readers/Writers
- 17.7 Asynchronous Channels
- 17.8 Synchronous Channels
- 17.9 Workers
- 17.10Mailboxes
- 17.11Actors
- Chapter
- Pages
- 145 pages
- Téléversé par
- lienhejb
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !
Ngân hàng đề thi môn: Hệ thống thông tin quản lý
Đề thi môn Cơ sở dữ liệu (kèm Đáp án) - Đại học Sư phạm kỹ thuật
Đề thi và đáp án môn Hệ thống thông tin kế toán
Đề thi và đáp án môn Cấu trúc dữ liệu giải thuật
Đáp án đề thi môn Mạng máy tính - ĐH Công nghệ thông tin (CNTT)
K5 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K2 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K3 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K4 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K1 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !