Introduction to F# Programming.

Introduction to F# Programming.

F# (pronounced “F Sharp”) is a strongly-typed, functional-first programming language for writing simple code to solve complex problems. From the business perspective, the primary role of F# is to reduce the time-to-deployment for analytical software components in the modern enterprise. Its interoperability with all .NET languages and libraries and its ability to tackle the complexity of components such as calculation engines and data-rich analytical services offer a compelling story for businesses.

Introduction to F# Programming.

Hello World

let helloWorld = "Hello" + " " + "world"


Random Numbers

let number = (new System.Random()).Next()


Simple function

/// A function to compute a sample curve

let sampleFunction (x:int) =

2*x*x – 5*x + 3

sampleFunction (7 + 4)

If-else condition

if 98.0 < 100.0 then 10 else 20

not false && (true || false)


Introduction to F# Programming.

Basic I/O

Introduction to F# Programming.