F#antom Treats for Halloween?

Last time we created our Phantom type and successfully converted it to a list.  Let’s quickly review the goals of our Phantom type before pushing forward. 

 

The primary [...]

F#un with Phantom Types

With Halloween tomorrow, now is the perfect time to take a look at phantom types in F#.  So what are phantom types?  Think of them as a way to embed a constraint into the type system of a language.  Here’s a great example of using them [...]

Type Classes vs Template Expansion : How to write a generic square function?

We may not have proper type class constraint support in F#, but we can still make sure our ‘square’ function doesn’t blow up at runtime.

 

Passing the Dictionary of Operations Explicitly

Type Classes for the .Net Underclass

In the comments of the last post, Cale Gibbard noted that the monad abstraction is pointless unless you can write code that works against the abstraction, instead of a particular instance.

Haskell let’s you write work with the monad abstraction through the use of type classes.  This ad hoc form of polymorphism [...]