type FPool<'a>(newRoutine, capacity : int) = let queue = Queue<'a> capacity
member this.Count = queue.Count
member this.New() = if queue.Count > 0 then queue.Dequeue() else newRoutine()
member this.Return(item) = queue.Enqueue(item)
I've been toying around with F# recently, it's good to see an example that you can easily compare and contrast with the C# version. Has anyone else tried out F#?