June 2006 Blog Posts

Bending the Cat: F# meets WPF 3D

I’ve been playing with F# and Windows Presentation Foundation (WPF a.k.a Avalon) and the combination is really nice. WPF comes with a new(ish) markup language called Xaml. This is another declarative language that works in a complimentary way to F#. Xaml allows you initialise an object graph into a specific state in a declarative style; moreover various designers will soon be come available to do this, so you won’t even have to hand code the Xaml file. You can then load the xaml file and use F# to tweak resulting images.   I have written...

C# style continuations in F# - yet another Fibonacci implementation

F# does not get support C# style continuations yet; I am reliably informed that it will do at some point.   However if you can not wait that long it is already fair easy to get C# style continuations by implementing System.Collections.Generic.IEmunerable your self. What’s more this can be implemented as a library function then implementing your enumerator becomes just a couple of lines of code.   Here is my implementation:   module Strangelights.Continuations   open System open System.Collections open System.Collections.Generic   // This function makes an IEnumerable interface from // a mutable value "n" and a function "f" that takes unit and // returns a...