TAILIEUCHUNG - Scala By Example

Scala smoothly integrates object-oriented and functional programming. It is designed to express common programming patterns in a concise, elegant, and typesafe way. Scala introduces several innovative language constructs. For instance:At the same time, Scala is compatible with Java. Java libraries and frameworks can be used without glue code or additional declarations. This document introduces Scala in an informal way, through a sequence of examples. | Scala By Example DRAFT May 24 2011 Martin Odersky Programming Methods Laboratory EPFL Switzerland Contents 1 Introduction 1 2 A First Example 3 3 Programming with Actors and Messages 7 4 Expressions and Simple Functions 11 Expressions And Simple Functions. 11 Parameters. 12 Conditional Expressions. 15 Example Square Roots by Newton s Method. 15 Nested Functions. 16 Tail Recursion. 18 5 First-Class Functions 21 Anonymous Functions . 22 Currying . 23 Example Finding Fixed Points of Language Elements Seen So Far . 28 6 Classes and Objects 31 7 Case Classes and Pattern Matching 43 Case Classes and Case Objects . 46 Pattern Matching . 47 8 Generic Types and Methods 51 Type Parameter Bounds . 53 Variance Annotations . .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.