This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Building = { | |
left : int | |
right : int | |
height : int | |
} | |
let buildings : Building[] = [| (* ... *) |] | |
let getHeight building = building.height | |
let getWidth building = building.right - building.left |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type AccountIdentifier = | |
| AccountIdentifier of System.Guid | |
type Account = { | |
Identifier : AccountIdentifier | |
Name : string | |
} | |
open Nessos.FsPickler // https://www.nuget.org/packages/FsPickler/ |
NewerOlder