Skip to content

Instantly share code, notes, and snippets.

@vshapenko
Created February 18, 2020 15:48
Show Gist options
  • Save vshapenko/ee5d1077786ab54cc75942ff7dd5d91e to your computer and use it in GitHub Desktop.
Save vshapenko/ee5d1077786ab54cc75942ff7dd5d91e to your computer and use it in GitHub Desktop.
type Option = {Text:string;Limit:int}
type Poll={Title:string;Options:PollOption [];Answers: Map<int,string[]>}
[<RequireQualifiedAccess>]
module Poll=
let create title options = {Title=title;Options=options;Answers=Map.empty}
let toggle poll = create poll.Title Array.empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment