Skip to content

Instantly share code, notes, and snippets.

@giuliohome
Created August 2, 2018 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuliohome/b61eef85a03e3ffa719b0fa5d27deb6f to your computer and use it in GitHub Desktop.
Save giuliohome/b61eef85a03e3ffa719b0fa5d27deb6f to your computer and use it in GitHub Desktop.
F# record type as business model
// business model
type Invoice = { CptyName: string; CptyNum: int; InvoiceNr: string; amount : decimal; curr: string; buysell: ActivePassive}
// array extraction from Excel with type provider
let ActiveInvoice =
ActiveInvoiceExcel.Data
|> Seq.map ( fun line -> { InvoiceNr = line.``Numero documento``; ... })
|> Seq.toArray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment