Skip to content
- Getting Set Up – Installing F# on Windows, Linux and Mac.
- Basic Concepts – A lightweight crash course in functional programming concepts.
Working With Functions
- Declaring Values and Functions – This article will show you how to declare simple functions, how to use type inference, and how to read F#’s ‘arrow’ notation.
- Pattern Matching Basics – Pattern matching is used for control flow. Its conceptually similar to a switch statement in other languages, but orders of magnitude more powerful.
- Recursion and Recursive Functions – A recursive function is a special type of function which calls itself.
- Higher Order Functions – Higher order functions take and return functions as values. Combined with currying, it allows programmers to write powerful and expressive programs.
Immutable Data Structures
- Option Types – Option types are simple, lightweight data structures which are commonly used to represent successful or failed computation.
- Tuples and Records – Tuples and records are simple data structures which allow programmers to group related values together into a single unit.
- Lists – A list represents an ordered group of values. F#’s List library has extensive support for manipulating and working with lists.
- Sequences – Sequence expressions represent sequences of data computed on-demand.
- Sets and Maps – Sets are conceptually similar to lists, except they cannot hold duplicate items. Maps allows programmers to relate keys to values and find items in the collection very efficiently.
- Discriminated Unions – Discriminated unions represent a finite, well-defined set of choices. Discriminated unions are often the tool of choice building up more complicated data structures including linked lists and a wide range of trees.
Imperative Programming
- Mutable Data – By default, variables in F# are immutable. However, F# supports mutable variables through mutable fields and ref cells.
- Control Flow – Decision making and Loops.
- Arrays – Arrays are ubiquitous mutable data structure used in imperative programming languages.
- Mutable Collections – Lists and Dictionaries.
- Basic I/O – Reading and writing to files and the console window.
- Exception Handling – Exception handling allows programmers to catch and handle errors whenever an application enters an invalid state.
Object Oriented Programming
- Operator Overloading – C#-like operator overloading.
- Classes – classes and objects are the foundation of object-oriented programming (OOP). They are used to model actions, processes, and any conceptual entities in applications.
- Inheritance – inheritance makes OOP code reusable. It allows programmers to create classes which inherit features from another class and add its own modifications.
- Interfaces – interfaces abstract away the implementation details of a class by defining a template of methods an object must implement and expose publicly.
- Events – events allow classes to send and receive messages between one another.
- Modules and Namespaces – modules and namespaces are used to organize classes into groups of related functionality.
F# Advanced
- Units of Measure – Units of measure attach metadata to floats, which allows floats to represent kilograms, pounds, Newtons, hectares, and so on.
- Caching – Techniques to store computed values for efficient future retrieval. Also called Memoization.
- Active Patterns – Active patterns allow programmers to wrap ad hoc values and objects in union-like structures for use in pattern matching.
- Advanced Data Structures – Overview of techniques used to implement immutable data structures.
- Reflection – Reflection allows programmers to inspect types and metadata in objects.
- Quotations – Quotations convert arbitrary F# code into an abstract syntax tree.
- Computation Expressions – Similar to monads in Haskell, computation expressions are used to simplify code written continuation-passing style.
Multi-threaded and Concurrent Applications
- Async Workflows – F#’s async primitive is fundamental for writing functional, simple multi-threaded code.
- MailboxProcessor Class – Mailboxes are used to implement “message-passing concurrency,” a style of concurrent programming used in massively parallel applications consisting of 10s or 1000s of independent nodes.
F# Tools
- Lexing and Parsing – FsLex and FsYacc, lexer/parser generators based on the GNU Bison family of generators, are used to implement custom grammars and domain-specific languages in F#.
Like this:
Like Loading...