Geeks With Blogs
Buhay Programmer Dont byte more than you can chew October 2008 Entries
F#: Making records behave like objects
The Goal Simulate a class using the Record type How we'll do this Create a tool that can translate a number into another format. In particular, we'll convert a number into Roman Numerals or multiply it by 10 Why are you doing this? No particular reason. I was just curious. I was just thinking that if F# did not support OOP, how can I still achieve the same things I was used to doing in C#? Ok so here we go.. F# record types are simple named types. We can pattern match over it and it is also constructed ......

Posted On Thursday, October 9, 2008 4:29 PM

Copyright © Erik Araojo | Powered by: