F# is an actively used programming language created in 2005. F# (pronounced F sharp) is a strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming methods. F# is most often used as a cross-platform Common Language Infrastructure (CLI) language, but it can also generate JavaScript and graphics processing unit (GPU) code. F# is developed by the F# Software Foundation, Microsoft and open contributors. Read more on Wikipedia...

14Years Old 38,948Users 2Jobs
  • F# ranks in the top 5% of languages
  • the F# website
  • the F# wikipedia page
  • F# first appeared in 2005
  • file extensions for F# include fs, fsi, fsx and fsscript
  • replit has an online F# repl
  • I have 124 facts about F#. what would you like to know? email me and let me know how I can help.

Example code from the Hello World Collection:

(* Hello World in F# *)

printf "Hello World!\n"

Example code from Linguist:

module Sample

open System

type Foo =
    {
        Bar : string
    }

type Baz = interface end

let Sample1(xs : int list) : string =
    xs
    |> List.map (fun x -> string x)
    |> String.concat ","

Example code from Wikipedia:

/// A simple prime number detector
let isPrime (n:int) =
   let bound = int (sqrt (float n))
   seq {2 .. bound} |> Seq.forall (fun x -> n % x <> 0)

// We are using async workflows
let primeAsync n =
    async { return (n, isPrime n) }

/// Return primes between m and n using multiple threads
let primes m n =
    seq {m .. n}
        |> Seq.map primeAsync
        |> Async.Parallel
        |> Async.RunSynchronously
        |> Array.filter snd
        |> Array.map fst

// Run a test
primes 1000000 1002000
    |> Array.iter (printfn "%d")

Trending Repos

repo stars description
fsharp 1919 The F# compiler, FSharp.Core library, and tools for F#

Last updated November 6th, 2019