售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Mastering F#
Mastering F#
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started in F#
Key features of F#
Functional and imperative languages
F# and integrated development environments
Using F# with Visual Studio
F# project structure
F# Script File
Using the F# Interactive window
The Visual Studio interactive window
The FSI interactive window
Basic values
Getting started with functions
Partially applied functions
Recursive functions
Higher-order functions
Summary
2. Functional Core with F#
F# primitive types
The unit type
Operator precedence
Custom operators
Immutability, type declarations, and strong type inference
Pattern matching
Functions with pattern matching
Pattern expressions
Guard expressions
Incomplete matches
Wildcard pattern
Tuples
Value matching
Records
Updating records
Functional update
Mutable fields
Field label declarations
Value matching
Common Language Infrastructure mutable records
Union cases
Options in F#
Structural equality and comparison
Custom equality and comparison
Reference cells and side-effects
Active patterns
Partial active patterns
Summary
3. Data Structures in F#
F# Collections
Sequence
Sequence expressions
Working with Seq functions
Creating sequences
Searching and finding elements
Sequence generators
Sequence computation operations
Arrays
Working with Array functions
Arrays and tuples
Array comprehensions
Array.Parallel module
Lists
Tail recursion
List and tuples
List comprehensions
Sets
Map
Advanced data structures
Binary trees
Balanced red-black trees
Summary
4. Imperative Programming in F#
Control structures
Looping
The for...to expression
The for...in expression
The while...do expression
Conditions
Working with conditions
Object-oriented programming
Defining a class
Constructors
Structs
Declaring fields, properties, methods, and static methods
Fields
Explicit fields
Properties
Static properties
Indexed properties
Methods
Static methods
Abstract and virtual methods
Parameters
Inheritance
Abstract
Defining an interface
Implement interface in F# types
Interface inheritance
Extensions
Generics
Using generic constructs
Wildcard generic constructs
Generic constraints
Generic extensions
Using LINQ in F#
Events
Declaring events
Event processing
Declaring delegates
Observables
Interop with C#
Optional parameters
Algebraic data types
Generic extensions consumable in C#
Exposing F# functionality to C#
Summary
5. Asynchronous Programming
Asynchronous workflows in F#
Using let!
Understanding async workflows
Async module
Async.AsBeginEnd
Async.AwaitEvent
Async.AwaitIAsyncResult
Async.AwaitWaitHandle
Async.AwaitTask
Async.FromBeginEnd
Async.FromContinuations
Async.Start
Async.StartChild
Async.StartAsTask
Async.StartChildAsTask
Async.StartImmediate
Async.SwitchToNewThread
Async.SwitchToThreadPool
Async.SwitchToContext
Async.Parallel
Async.OnCancel
Actor programming with MailboxProcessor
Design patterns with MailboxProcessor
Type-safe MailboxProcessor, an imperative approach
Type-safe MailboxProcessor, a functional approach
Messages and union types
Reporting results from the mailbox
Agents and errors
MailboxProcessor functions
Implementing a non-blocking queue
Reactive programming with async workflows
Summary
6. Type Providers
SQL type provider
Preparing the test database
Using the type provider
Querying the data
SQL entity type provider
Using the type provider
Querying the data
OData type provider
Prerequisites
Using the type provider
Querying the data
Web service type provider
Prerequisites
Using the type provider
Querying the data
Data analysis with type providers
Prerequisites
Using the type provider
Query builder
Summary
7. Web Programming in F#
ASP.NET Web API 2
Suave
Routing with Suave
Templating with Suave
WebSharper
Installing WebSharper
Sitelets
UI.Next
Fable
Using Fable with React
Summary
8. Application Development in F#
GitHub Electron
npm
webpack
Using React components with Electron
npm start
Automatic refresh on code changes
Using Node APIs from the renderer process
Summary
9. Testing in F#
Unit testing
Unit tests with NUnit
Setting up the test environment
Mocking
F# idiomatic assertions
Asynchronous tests
Running NUnit tests with FAKE
NUnit and Fable
Property-based testing
Integrating FsCheck and NUnit
Automated browser testing
Summary
10. Distributed Programming in F#
Actor Model
MailboxProcessor
Akka.NET
Supervision
Remote actors
Summary
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜