F# Basics

Getting started with functional-first programming

Why F#?

F# is a functional-first language that runs on .NET with excellent tooling and library support.

Functional Core

Immutable by default, powerful type inference, and elegant syntax

.NET Integration

Full access to the .NET ecosystem and C# interoperability

First F# Program

// Simple F# console application
open System

[]
let main argv =
    printfn "Hello %s" (String.Join(" ", argv))
    0 // return exit code

Interactive Development

> let square x = x * x;;
val square: x:int -> int

> square 5;;
val it: int = 25

Use F# Interactive (FSI) for rapid prototyping and testing.