# Fsharp

> F# functional-first programming on .NET. Use for .fs files.

- Skill: `g1joshi/fsharp` (Agent Skill)
- Install (CLI): `npx skillmds@latest add g1joshi/fsharp`
- Raw SKILL.md: https://api.skillmd.com/api/skills/g1joshi/fsharp/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: G1Joshi (https://skillmd.com/u/g1joshi)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/g1joshi/fsharp

---


# F#

F# is the functional sibling of C# on .NET. v9.0 (2025) brings **Nullable Reference Types** integration and better performance for list comprehensions.

## When to Use

- **Financial Tech**: Correctness and domain modeling.
- **Data Processing**: Pipeline operator `|>` and immutability by default.
- **Interpro**: Seamlessly use any NuGet package.

## Core Concepts

### Discriminated Unions

`type Shape = Circle of float | Rect of float * float`.

### Pipe Operator

`data |> filter |> map`.

### Computation Expressions

`async { ... }`, `task { ... }`.

## Best Practices (2025)

**Do**:

- **Use Records**: Immutable data containers.
- **Use Pattern Matching**: `match x with ...`.
- **Use `SAFE Stack`**: For full-stack F# web apps (Saturn, Azure, Fable, Elmish).

**Don't**:

- **Don't mimic C#**: Avoid classes/inheritance unless interoperating.

## References

- [F# Guide](https://fsharp.org/)

