I've pasted a code sample here with a comment of what should be printed out: http://dpaste.dzfl.pl/02cfc280

memoize is taken straight from std.functional, I just added a writeln so I could see more about what was going on. slowFuncString should only be calculated twice with the input given: Once for "Test1" and once for "Test2" but it's being calculated every time. The same answer will probably answer both of these questions but:

1) Why does p = null when the tuple of Test2 is in the memo AA?
2) How does memoize appear to be adding more than one of the same key to the memo AA?

Thanks.

Reply via email to