Skip to content

Instantly share code, notes, and snippets.

Avatar

Mathias Brandewinder mathias-brandewinder

View GitHub Profile
View FsharpSnippets.fs
open System
let readInt () = Console.In.ReadLine() |> int
let N = readInt ()
let readline = [ for i in 0 .. N - 1 -> readInt () ]
let minimumBetweenTwoNumbers n1 n2 = min n1 n2
let rec minimum data mini =
View FsharpSnippets
let rec minimum data mini =
match data with
| first::second::tail ->
let min = abs (first - second) |> minimumBetweenTwoNumbers mini
match tail with
| [] -> min
| _ -> minimum second::tail min
View gist:2487f50027ce5282b0fc
#r "/home/you/src/thisthing/lib/JSONNet/Newtonsoft.Json.dll"
open System
open System.Collections.Generic // for dictionary
open Newtonsoft.Json
// Identifier type
type Id = System.Guid
module EventStore =