Skip to content

Instantly share code, notes, and snippets.

@ciwolsey
Created March 4, 2020 23:16
Show Gist options
  • Save ciwolsey/0347dfda28fdd5a33d5744842089ee01 to your computer and use it in GitHub Desktop.
Save ciwolsey/0347dfda28fdd5a33d5744842089ee01 to your computer and use it in GitHub Desktop.
open System
type Description = Description of String
type Room = {
Description: Description
Objects: Object list
}
type Object = {
Description: Description
}
[<EntryPoint>]
let main argv =
let room = {
Description = Description "The room is cold and dark"
Objects = [{ Description = Description "A candle glimmers in the corner"}]
}
printfn "%A" room.Description
//room.Objects |> List.iter (fun obj -> printfn "%A" obj.Description)
0 // return an integer exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment