Functional Programming

F# – Use Discriminated Unions instead of class hierarchies

When you consider the age old problem of representing different shapes (circle, triangle, square, rectangle, etc.) my OO fed developer brain naturally jumps to a class hierarchy along the line of: This is perfectly fine and legit, but it’s not the only way to approach things. Since I’ve been on a more varied diet of …

F# – Use Discriminated Unions instead of class hierarchies Read More »

Project Euler – Problem 79 Solution

Problem A common security method used for online banking is to ask the user for three random characters from a passcode. For example, if the passcode was 531278, they may ask for the 2nd, 3rd, and 5th characters; the expected reply would be: 317. The text file, keylog.txt, contains fifty successful login attempts. Given that …

Project Euler – Problem 79 Solution Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close