Lýsing:
This comprehensive introduction to the principles of functional programming using F# shows how to apply basic theoretical concepts to produce succinct and elegant programs. It demonstrates the role of functional programming in a wide spectrum of applications including databases and systems. Coverage also includes advanced features in the. NET library, the imperative features of F# and topics such as text processing, sequences, computation expressions and asynchronous computation.
Annað
- Höfundar: Michael R. Hansen, Hans Rischel
- Útgáfa:1
- Útgáfudagur: 2013-05-13
- Hægt að prenta út 5 bls.
- Hægt að afrita 5 bls.
- Format:ePub
- ISBN 13: 9781107065055
- Print ISBN: 9781107019027
- ISBN 10: 1107065054
Efnisyfirlit
- Cover
- Half Title
- Title Page
- Copyright
- Table of Contents
- Preface
- 1 Getting started
- 1.1 Values, types, identifiers and declarations
- 1.2 Simple function declarations
- 1.3 Anonymous functions. Function expressions
- 1.4 Recursion
- 1.5 Pairs
- 1.6 Types and type checking
- 1.7 Bindings and environments
- 1.8 Euclid’s algorithm
- 1.9 Evaluations with environments
- 1.10 Free-standing programs
- Summary
- Exercises
- 2 Values, operators, expressions and functions
- 2.1 Numbers. Truth values. The unit type
- 2.2 Operator precedence and association
- 2.3 Characters and strings
- 2.4 If-then-else expressions
- 2.5 Overloaded functions and operators
- 2.6 Type inference
- 2.7 Functions are first-class citizens
- 2.8 Closures
- 2.9 Declaring prefix and infix operators
- 2.10 Equality and ordering
- 2.11 Function application operators |> and <|
- 2.12 Summary of the basic types
- Summary
- Exercises
- 3 Tuples, records and tagged values
- 3.1 Tuples
- 3.2 Polymorphism
- 3.3 Example: Geometric vectors
- 3.4 Records
- 3.5 Example: Quadratic equations
- 3.6 Locally declared identifiers
- 3.7 Example: Rational numbers. Invariants
- 3.8 Tagged values. Constructors
- 3.9 Enumeration types
- 3.10 Exceptions
- 3.11 Partial functions. The option type
- Summary
- Exercises
- 4 Lists
- 4.1 The concept of a list
- 4.2 Construction and decomposition of lists
- 4.3 Typical recursions over lists
- 4.4 Polymorphism
- 4.5 The value restrictions on polymorphic expressions
- 4.6 Examples. A model-based approach
- Summary
- Exercises
- 5 Collections: Lists, maps and sets
- 5.1 Lists
- 5.2 Finite sets
- 5.3 Maps
- Summary
- Exercises
- 6 Finite trees
- 6.1 Chinese boxes
- 6.2 Symbolic differentiation
- 6.3 Binary trees. Parameterized types
- 6.4 Traversal of binary trees. Search trees
- 6.5 Expression trees
- 6.6 Trees with a variable number of sub-trees. Mutual recursion
- 6.7 Electrical circuits
- Summary
- Exercises
- 7 Modules
- 7.1 Abstractions
- 7.2 Signature and implementation
- 7.3 Type augmentation. Operators in modules
- 7.4 Type extension
- 7.5 Classes and objects
- 7.6 Parameterized modules. Type variables in signatures
- 7.7 Customizing equality, hashing and the string function
- 7.8 Customizing ordering and indexing
- 7.9 Example: Piecewise linear plane curves
- Summary
- Exercises
- 8 Imperative features
- 8.1 Locations
- 8.2 Operators on locations
- 8.3 Default values
- 8.4 Sequential composition
- 8.5 Mutable record fields
- 8.6 References
- 8.7 While loops
- 8.8 Imperative functions on lists and other collections
- 8.9 Imperative tree traversal
- 8.10 Arrays
- 8.11 Imperative set and map
- 8.12 Functions on collections. Enumerator functions
- 8.13 Imperative queue
- 8.14 Restrictions on polymorphic expressions
- Summary
- Exercises
- 9 Efficiency
- 9.1 Resource measures
- 9.2 Memory management
- 9.3 Two problems
- 9.4 Solutions using accumulating parameters
- 9.5 Iterative function declarations
- 9.6 Tail recursion obtained using continuations
- Summary
- Exercises
- 10 Text processing programs
- 10.1 Keyword index example: Problem statement
- 10.2 Capturing data using regular expressions
- 10.3 Text I/O
- 10.4 File handling. Save and restore values in files
- 10.5 Reserving, using and disposing resources
- 10.6 Culture-dependent information. String orderings
- 10.7 Conversion to textual form. Date and time
- 10.8 Keyword index example: The IndexGen program
- 10.9 Keyword index example: Analysis of a web-source
- 10.10 Keyword index example: Putting it all together
- Summary
- Exercises
- 11 Sequences
- 11.1 The sequence concept in F#
- 11.2 Some operations on sequences
- 11.3 Delays, recursion and side-effects
- 11.4 Example: Sieve of Eratosthenes
- 11.5 Limits of sequences: Newton-Raphson approximations
- 11.6 Sequence expressions
- 11.7 Specializations of sequences
- 11.8 Type providers and databases
- Summary
- Exercises
- 12 Computation expressions
- 12.1 The agenda when defining your own computations
- 12.2 Introducing computation expressions using sequence expressions
- 12.3 The basic functions: For and Yield
- 12.4 The technical setting when defining your own computations
- 12.5 Example: Expression evaluation with error handling
- 12.6 The basic functions: Bind, Return, ReturnFrom and Zero
- 12.7 Controlling the computations: Delay and Start
- 12.8 The basic function: Delay
- 12.9 The fundamental properties of For and Yield, Bind and Return
- 12.10 Monadic parsers
- Summary
- Exercises
- 13 Asynchronous and parallel computations
- 13.1 Multi-core processors, cache memories and main memory
- 13.2 Processes, threads and tasks
- 13.3 Challenges and pitfalls in concurrency
- 13.4 Asynchronous computations
- 13.5 Reactive programs
- 13.6 Parallel computations
- Summary
- Exercises
- Appendix A Programs from the keyword example
- A.1 Web source files
- A.2 The IndexGen program
- A.3 The NextLevelRefs program
- Appendix B The TextProcessing library
- Appendix C The dialogue program from Chapter
- References
- Index
UM RAFBÆKUR Á HEIMKAUP.IS
Bókahillan þín er þitt svæði og þar eru bækurnar þínar geymdar. Þú kemst í bókahilluna þína hvar og hvenær sem er í tölvu eða snjalltæki. Einfalt og þægilegt!Rafbók til eignar
Rafbók til eignar þarf að hlaða niður á þau tæki sem þú vilt nota innan eins árs frá því bókin er keypt.
Þú kemst í bækurnar hvar sem er
Þú getur nálgast allar raf(skóla)bækurnar þínar á einu augabragði, hvar og hvenær sem er í bókahillunni þinni. Engin taska, enginn kyndill og ekkert vesen (hvað þá yfirvigt).
Auðvelt að fletta og leita
Þú getur flakkað milli síðna og kafla eins og þér hentar best og farið beint í ákveðna kafla úr efnisyfirlitinu. Í leitinni finnur þú orð, kafla eða síður í einum smelli.
Glósur og yfirstrikanir
Þú getur auðkennt textabrot með mismunandi litum og skrifað glósur að vild í rafbókina. Þú getur jafnvel séð glósur og yfirstrikanir hjá bekkjarsystkinum og kennara ef þeir leyfa það. Allt á einum stað.
Hvað viltu sjá? / Þú ræður hvernig síðan lítur út
Þú lagar síðuna að þínum þörfum. Stækkaðu eða minnkaðu myndir og texta með multi-level zoom til að sjá síðuna eins og þér hentar best í þínu námi.
Fleiri góðir kostir
- Þú getur prentað síður úr bókinni (innan þeirra marka sem útgefandinn setur)
- Möguleiki á tengingu við annað stafrænt og gagnvirkt efni, svo sem myndbönd eða spurningar úr efninu
- Auðvelt að afrita og líma efni/texta fyrir t.d. heimaverkefni eða ritgerðir
- Styður tækni sem hjálpar nemendum með sjón- eða heyrnarskerðingu
- Gerð : 208
- Höfundur : 16304
- Útgáfuár : 2013
- Leyfi : 379