Type classe, generic memoization
- by nicolas
Something quite odd is happening with y types and I quite dont understand if this is justified or not. I would tend to think not.
This code works fine :
type DictionarySingleton private () =
static let mutable instance = Dictionary<string*obj, obj>()
static member Instance = instance
let memoize (f:'a -> 'b) =
…