RosettaCodeData/Task/Variables/F-Sharp/variables-1.fs

6 lines
265 B
Forth

let x = 5 // Int
let mutable y = "mutable" // Mutable string
let recordType = { foo : 6; bar : 6 } // Record
let intWidget = new Widget<int>() // Generic class
let add2 x = 2 + x // Function value