Multiple items
union case State.State: State
--------------------
type State = | State
Full name: index.State
Multiple items
union case Event.Event: Event
--------------------
module Event
from Microsoft.FSharp.Control
--------------------
type Event = | Event
Full name: index.Event
--------------------
type Event<'T> =
new : unit -> Event<'T>
member Trigger : arg:'T -> unit
member Publish : IEvent<'T>
Full name: Microsoft.FSharp.Control.Event<_>
--------------------
type Event<'Delegate,'Args (requires delegate and 'Delegate :> Delegate)> =
new : unit -> Event<'Delegate,'Args>
member Trigger : sender:obj * args:'Args -> unit
member Publish : IEvent<'Delegate,'Args>
Full name: Microsoft.FSharp.Control.Event<_,_>
--------------------
new : unit -> Event<'T>
--------------------
new : unit -> Event<'Delegate,'Args>
type unit = Unit
Full name: Microsoft.FSharp.Core.unit
Multiple items
union case Html.Html: Html
--------------------
type Html = | Html
Full name: index.Html
Multiple items
val string : value:'T -> string
Full name: Microsoft.FSharp.Core.Operators.string
--------------------
type string = System.String
Full name: Microsoft.FSharp.Core.string
type 'T list = List<'T>
Full name: Microsoft.FSharp.Collections.list<_>
Multiple items
val seq : sequence:seq<'T> -> seq<'T>
Full name: Microsoft.FSharp.Core.Operators.seq
--------------------
type seq<'T> = System.Collections.Generic.IEnumerable<'T>
Full name: Microsoft.FSharp.Collections.seq<_>
The Gamma
Democratizing Data Science
Welcome to the post-fact world
Facts and F# type providers
DEMO
Checking facts with type providers
Easy way of getting started with F#
fsharpworks.com/workshops
F# is great for data science
www.fslab.org
Try it now in Azure Notebooks
Can technology democratize facts?
Can the result be reproduced?
Is the visualization misleading?
Can it be done by non-experts?
Can the reader explore further?
The Gamma
DEMO
Carbon emissions in The Gamma
F# to JavaScript via Fable
Reasonably nice modern JavaScript
Active and welcoming community
Pragmatic functional-first style
Dot-driven data exploration
Dot-driven programming via type providers
Dot-driven programming via type providers
DEMO
Visualizing Olympic medals
Elm-style architecture
1:
2:
3:
4:
5:
|
// Calculate new state when event happens
val update : State -> Event -> State
// Render HTML from the current state
val render : (unit -> Event) -> State -> Html
|
Implementing Elm-style TODO list
1:
2:
3:
4:
5:
6:
7:
8:
|
type Update =
| Input of string
| Remove of Guid
| Create
type Model =
{ Items : (Guid * string) list
Input : string }
|
DEMO: Getting started with Fable
Making data more engaging
DEMO
Guess the government expenditure
Composable functional charts
Composable functional charts
1:
2:
3:
4:
5:
6:
|
type Shape =
| Style of ShapeStyle * Shape
| Line of seq<Value * Value>
| Shape of seq<Value * Value>
| Layered of seq<Shape>
| Axes of Shape
|
DEMO
Functional composable charts
Type providers for data access magic
Fable and Elm-style client-side
Functional domain modelling for the win!