Skip to content

Instantly share code, notes, and snippets.

View johnazariah's full-sized avatar

John Azariah johnazariah

  • Microsoft Corporation
  • Brisbane, Queensland, Australia
  • 00:36 (UTC +10:00)
View GitHub Profile
type Building =
{ left : int
right : int
height : int }
let buildings = []
let getHeight building = building.height
let getWidth building = building.right - building.left
let getArea building = getHeight building * getWidth building
@johnazariah
johnazariah / mine.fs
Last active August 29, 2015 14:04
Interview Question
type Building = {
left : int
right : int
height : int
}
let buildings : Building[] = [| (* ... *) |]
let getHeight building = building.height
let getWidth building = building.right - building.left
@johnazariah
johnazariah / fspickler serialization.fs
Created May 20, 2014 05:27
Serialization with FsPickler
type AccountIdentifier =
| AccountIdentifier of System.Guid
type Account = {
Identifier : AccountIdentifier
Name : string
}
open Nessos.FsPickler // https://www.nuget.org/packages/FsPickler/