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

6 lines
265 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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