Andrea Amantini / Jul 25 2019

F# Template

Fixme:

  • Imports of Charting library
  • Formulas

{
    Html = @"<div style=""background-color: magenta; font-weight: bold;"">Hello F #️⃣</div>"
} |> Display
Hello F #️⃣
Util.Math("f(x) = sin(x)") |> Display
$$f(x) = sin(x)$$
{
    Columns = [| "First Name"; "Last Name" |]
    Rows = 
        [|
            [| "Duane"; "Dibbley" |]
            [| "Arnold"; "Rimmer" |]
            [| "David"; "Lister" |]
            [| "Dave"; "Lister" |]
            [| ""; "Kryten" |]
            [| ""; "Holly" |]
            [| "Kristine"; "Kochanski" |]
         |]
} |> Display
First NameLast Name
DuaneDibbley
ArnoldRimmer
DavidLister
DaveLister
Kryten
Holly
KristineKochanski
open System

// start at -PI and finish at PI
let startX = -Math.PI
let endX = Math.PI

// the data
let data = 
    [| startX..0.1..endX |]
    |> Array.map (fun x -> (x, sin(x)))

Chart.Line(data)
|> Chart.WithXAxis(true, "", 3.2, -3.2)
|> Chart.WithYAxis(true, "", 1.0, -1.0)
|> Display