$ whois fsharp
F#
first released in 2005 · by Don Syme
$ guessprog --inspect fsharp
- year
- 2005
- paradigm
- functional
- family
- ml
- memory
- automatic gc
- binding
- static
- safety
- strong
FSHARP(7)
- AUTHORS
- Don Syme
- HISTORY
- F# was created by Don Syme at Microsoft Research in Cambridge, UK, and first released in 2005. Syme, who had also worked on adding generics to .NET, wanted to bring the OCaml style of typed functional programming to the .NET platform with full access to its libraries. F# keeps OCaml's type inference and pattern matching and adds features such as computation expressions, type providers and units of measure. It later became open source and cross-platform alongside .NET Core.
- USAGE
- F# is a niche but well-supported .NET language, used in finance, data analysis, scientific computing and by teams who want functional programming on .NET. Microsoft ships it with .NET, and the F# Software Foundation supports its community.
- SEE ALSO
- F# on Wikipedia ↗
type Shape =
| Circle of radius: float
| Rectangle of width: float * height: float
let area shape =
match shape with
| Circle r -> System.Math.PI * r * r
| Rectangle (w, h) -> w * h
[ Circle 1.0; Rectangle (2.0, 3.0) ]
|> List.map area
|> List.sum
|> printfn "Total area: %.2f"