Whom Is This Book For?... xxiv How Is This Book Organized?... xxiv Additional Resources... xxvi

Similar documents
Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Microsoft Visual C# Step by Step. John Sharp

Programming in Scala Second Edition

Microsoft. Microsoft Visual C# Step by Step. John Sharp

CHAPTER 1: INTRODUCING C# 3

object/relational persistence What is persistence? 5

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

CHAPTER 1: INTRODUCTION TO THE IDE 3

foreword to the first edition preface xxi acknowledgments xxiii about this book xxv about the cover illustration

Learning C# 3.0. Jesse Liberty and Brian MacDonald O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo

Symbols. The Book of F# 2014 by Dave Fancher

C# in Depth THIRD EDITION

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

"Charting the Course... MOC C: Querying Data with Transact-SQL. Course Summary

C# 6.0 in a nutshell / Joseph Albahari & Ben Albahari. 6th ed. Beijin [etc.], cop Spis treści

Programming Microsoft LINQ in

Programming Kotlin. Familiarize yourself with all of Kotlin s features with this in-depth guide. Stephen Samuel Stefan Bocutiu BIRMINGHAM - MUMBAI

C# in Depth SECOND EDITION JON SKEET. MANNING Greenwich (74 w. long.)

Querying Data with Transact SQL

SQL Queries. for. Mere Mortals. Third Edition. A Hands-On Guide to Data Manipulation in SQL. John L. Viescas Michael J. Hernandez

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

C# Programming in the.net Framework

Table of Contents Chapter 1 - Introduction Chapter 2 - Designing XML Data and Applications Chapter 3 - Designing and Managing XML Storage Objects

Foundation XML and E4X for Flash and Flex

C# Programming: From Problem Analysis to Program Design. Fourth Edition

Introduction to C++/CLI 3. What C++/CLI can do for you 6 The rationale behind the new syntax Hello World in C++/CLI 13

"Charting the Course to Your Success!" MOC D Querying Microsoft SQL Server Course Summary

6232B: Implementing a Microsoft SQL Server 2008 R2 Database

Course Syllabus C # Course Title. Who should attend? Course Description

Programming C# 5.0. Ian Griffiths O'REILLY' Beijing Cambridge * Farnham Kbln Sebastopol Tokyo

The Designer's Guide to VHDL Second Edition

SystemVerilog For Design Second Edition

"Charting the Course... Java Programming Language. Course Summary

JAVA CONCEPTS Early Objects

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

Delphi in Depth: FireDAC, Copyright 2017 Cary Jensen ISBN: ISBN-10: , ISBN-13: ,

Acknowledgments Introduction. Part I: Programming Access Applications 1. Chapter 1: Overview of Programming for Access 3

"Charting the Course... SharePoint 2007 Hands-On Labs Course Summary

Learn Windows PowerShell 3 in a Month of Lunches

Pro JPA 2. Mastering the Java Persistence API. Apress* Mike Keith and Merrick Schnicariol

Variable Scope The Main() Function Struct Functions Overloading Functions Using Delegates Chapter 7: Debugging and Error Handling Debugging in Visual

COPYRIGHTED MATERIAL. Contents. Chapter 1: Introducing T-SQL and Data Management Systems 1. Chapter 2: SQL Server Fundamentals 23.

Beginning ASP.NET. 4.5 in C# Matthew MacDonald

Contents in Detail. Foreword by Xavier Noria

COPYRIGHTED MATERIAL. Contents. Introduction. Chapter 1: Welcome to SQL Server Integration Services 1. Chapter 2: The SSIS Tools 21

Index. Cambridge University Press Functional Programming Using F# Michael R. Hansen and Hans Rischel. Index.

Object-Oriented Programming in C# (VS 2015)

"Charting the Course... Agile Database Design Techniques Course Summary

Contents. Chapter 1 SPECIFYING SYNTAX 1

Contents. Preface xvii Acknowledgments. CHAPTER 1 Introduction to Parallel Computing 1. CHAPTER 2 Parallel Programming Platforms 11

Professional. haxe and Neko. Franco Ponticelli Lee McColl-Sylvester WILEY. Wiley Publishing, Inc.

CS 457/557: Functional Languages

Introduction to Functional Programming in Haskell 1 / 56

"Charting the Course... MOC Programming in C# with Microsoft Visual Studio Course Summary

Object-Oriented Programming in C# (VS 2012)

Beginning Database. Design. From Novice to Professional. Clare Churcher. Apress-

F# for Scientists. Jon Harrop Flying Frog Consultancy Ltd. Foreword by Don Syme A JOHN WILEY & SONS, INC., PUBLICATION WILEY

1.2 Wicket in a nutshell 10 Just Java 11 Just HTML 12 The right abstractions 13

Prerequisites: The student should have programming experience in a high-level language. ITCourseware, LLC Page 1. Object-Oriented Programming in C#

Table of Contents. Preface... xxi

Oracle Database 11g: SQL Fundamentals I

Language. f SQL. Larry Rockoff COURSE TECHNOLOGY. Kingdom United States. Course Technology PTR. A part ofcenqaqe Learninq

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader...

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

"Charting the Course... MOC A Developing Data Access Solutions with Microsoft Visual Studio Course Summary

CS 430 Spring Mike Lam, Professor. Data Types and Type Checking

Complete Python call :

Contents. Before You Begin. Object Technology: A Brief Review

JavaScript Patterns O'REILLY* S toy an Stefanov. Sebastopol. Cambridge. Tokyo. Beijing. Farnham K8ln

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

PTN-102 Python programming

Who This Book Is For What This Book Covers How This Book Is Structured What You Need to Use This Book. Source Code

Programming in Visual Basic with Microsoft Visual Studio 2010

Querying Data with Transact-SQL

Programming. Principles and Practice Using C++ Bjarne Stroustrup. / Addison-Wesley. Second Edition

Querying Data with Transact-SQL (20761)

List of Code Samples. xiii

Silverlight Recipes. A Problem-Solution Approach. Apress* Jit Ghosh and Rob Cameron

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

COPYRIGHTED MATERIAL. Contents. Part One: Team Architect 1. Chapter 1: Introducing the Visual Designers 3

Inside Microsoft* SQL Server 2008: T-SQL Querying

Oracle Database 11g: SQL and PL/SQL Fundamentals

Index. Symbol function, 391

Querying Microsoft SQL Server

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26

Introduction to Programming Using Java (98-388)

Absolute C++ Walter Savitch

CROSS-REFERENCE TABLE ASME A Including A17.1a-1997 Through A17.1d 2000 vs. ASME A

COURSE OUTLINE: Querying Microsoft SQL Server

Course Hours

SECURED PROGRAMMING IN.NET DETAILED TRAINING CONTENT INDUSTRIAL TRAINING PROGRAM ( )

The SQL Guide to Pervasive PSQL. Rick F. van der Lans

Python INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython.

Querying Data with Transact-SQL

Contents. Acknowledgments Parachutes: Coda. About the Author. Presentation Conventions. PART ONE Foundations 1

Contents in Detail. Who This Book Is For... xx Using Ruby to Test Itself... xx Which Implementation of Ruby?... xxi Overview...

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

Level: M.Ed. Credit Hour: 3 (2+1) Semester: Third Teaching Hour: 80(32+48)

20461: Querying Microsoft SQL Server 2014 Databases

The C# Programming Language. Overview

Transcription:

Foreword by Bryan Hunter xv Preface xix Acknowledgments xxi Introduction xxiii Whom Is This Book For?... xxiv How Is This Book Organized?... xxiv Additional Resources... xxvi 1 Meet F# 1 F# in Visual Studio... 2 Project Templates.... 2 Project Organization... 4 Significance of Whitespace.... 5 Grouping Constructs.... 6 Namespaces.... 6 Modules... 7 Expressions Are Everywhere... 8 Application Entry Point... 9 Implicit Return Values... 9 Your First F# Program... 10 Summary... 12 2 F# Interactive 13 Running F# Interactive... 13 F# Interactive Output... 15 The it Identifier.... 15 Playing in the Sandbox.... 15 #help... 16 #quit... 16 #load... 16 #r... 17 #I... 17 #time... 17 Scripting... 18 F# Interactive Options.... 20 --load... 20 --use.... 21 --reference... 21 --lib... 21

--define.... 21 --exec.... 22 --... 22 --quiet... 22 --optimize... 23 --tailcalls.... 23 Summary... 23 3 Fundamentals 25 Immutability and Side Effects... 26 Functional Purity.... 27 Bindings........................................................ 28 let Bindings... 28 use Bindings... 30 do Bindings.... 33 Identifier Naming.... 33 Core Data Types... 33 Boolean Values and Operators... 34 Numeric Types... 34 Characters... 37 Strings... 37 Type Inference... 39 Nullability... 41 Options... 41 Unit Type... 42 Enumerations.... 43 Flags Enumerations... 43 Reconstructing Enumeration Values... 45 Flow Control... 45 Looping... 45 Branching... 47 Generics... 48 Automatic Generalization... 49 Explicit Generalization... 50 Flexible Types... 52 Wildcard Pattern... 52 Statically Resolved Type Parameters... 52 When Things Go Wrong... 53 Handling Exceptions... 53 Raising Exceptions... 55 Custom Exceptions... 56 String Formatting... 58 Type Abbreviations... 59 Comments.... 59 End-of-Line Comments.... 60 Block Comments... 60 XML Documentation... 60 Summary... 62 x

4 Staying Objective 63 Classes... 64 Constructors... 64 Fields... 68 Properties... 69 Methods... 73 Events.... 77 Structures... 80 Inheritance... 81 Casting.... 82 Overriding Members... 83 Abstract Classes... 84 Abstract Members... 85 Virtual Members... 87 Sealed Classes... 87 Static Members... 88 Static Initializers... 88 Static Fields.... 89 Static Properties.... 89 Static Methods.... 90 Mutually Recursive Types... 91 Interfaces... 91 Implementing Interfaces... 92 Defining Interfaces... 93 Custom Operators... 94 Prefix Operators... 94 Infix Operators... 95 New Operators... 96 Global Operators... 96 Object Expressions.... 97 Type Extensions... 99 Summary... 101 5 Let s Get Functional 103 What Is Functional Programming?... 104 Programming with Functions... 104 Functions as Data... 104 Interoperability Considerations... 105 Currying... 106 Partial Application... 106 Pipelining... 107 Function Composition... 108 Recursive Functions.... 109 Tail-Call Recursion.......................................... 110 Mutually Recursive Functions... 111 Lambda Expressions... 112 Closures... 112 xi

Functional Types... 113 Tuples... 113 Record Types... 118 Discriminated Unions... 122 Defining Discriminated Unions.... 123 Additional Members.... 129 Lazy Evaluation... 130 Summary... 132 6 Going to Collections 133 Sequences.... 134 Creating Sequences... 134 Working with Sequences... 137 Arrays... 142 Creating Arrays.... 142 Working with Arrays... 144 Multidimensional Arrays... 147 Jagged Arrays.... 148 Lists... 149 Creating Lists.... 149 Working with Lists... 150 Sets... 152 Creating Sets... 152 Working with Sets... 153 Maps... 155 Creating Maps... 156 Working with Maps... 156 Converting Between Collection Types... 157 Summary... 158 7 PATTerns, PATTerns, Everywhere 159 Match Expressions... 159 Guard Clauses... 160 Pattern-Matching Functions... 161 Exhaustive Matching.... 162 Variable Patterns... 163 The Wildcard Pattern... 163 Matching Constant Values.... 164 Identifier Patterns... 164 Matching Union Cases... 164 Matching Literals... 165 Matching Nulls... 165 Matching Tuples... 166 Matching Records... 167 Matching Collections... 168 Array Patterns... 168 List Patterns... 168 Cons Patterns... 169 xii

Matching by Type... 169 Type-Annotated Patterns...................................... 169 Dynamic Type-Test Patterns... 170 As Patterns... 171 Combining Patterns with AND... 171 Combining Patterns with OR... 172 Parentheses in Patterns... 172 Active Patterns... 173 Partial Active Patterns... 174 Parameterized Active Patterns... 176 Summary... 176 8 Measuring Up 177 Defining Measures... 178 Measure Formulas... 178 Applying Measures... 179 Stripping Measures... 180 Enforcing Measures... 181 Ranges... 182 Converting Between Measures.... 182 Static Conversion Factors... 182 Static Conversion Functions.... 183 Generic Measures... 184 Custom Measure-Aware Types.... 184 Summary... 185 9 Can I Quote You on That? 187 Comparing Expression Trees and Quoted Expressions... 188 Composing Quoted Expressions.... 190 Quoted Literals... 190.NET Reflection... 191 Manual Composition... 192 Splicing Quoted Expressions... 194 Decomposing Quoted Expressions... 194 Parsing Quoted Expressions... 195 Substituting Reflection.... 197 Summary... 199 10 Show Me the Data 201 Query Expressions... 201 Basic Querying... 203 Filtering Data... 204 Accessing Individual Items... 207 Sorting Results... 209 Grouping... 210 Paginating... 211 xiii

Aggregating Data... 213 Detecting Items... 214 Joining Multiple Data Sources... 215 Extending Query Expressions... 219 Type Providers... 221 Available Type Providers... 222 Using Type Providers... 223 Example: Accessing an OData Service.... 224 Example: Parsing a String with RegexProvider.... 226 Summary... 228 11 Asynchronous and Parallel Programming 229 Task Parallel Library... 230 Potential Parallelism... 231 Data Parallelism.... 231 Task Parallelism... 234 Asynchronous Workflows... 241 Creating and Starting Asynchronous Workflows... 242 Cancelling Asynchronous Workflows... 245 Exception Handling... 247 Asynchronous Workflows and the Task Parallel Library.... 248 Agent-Based Programming... 250 Getting Started... 250 Scanning for Messages... 251 Replying to Messages.... 252 Example: Agent-Based Calculator... 253 Summary... 255 12 Computation Expressions 257 Anatomy of a Computation Expression... 258 Example: FizzBuzz.... 261 Example: Building Strings... 264 Summary... 269 Index 271 xiv