Quote Originally Posted by JSoftware View Post
You could convert it directly, but it would look really bad. Those pieces of code use lambda functions, which can be used in the newest Delphi(anonymous functions)

If you wanted to convert them I would use virtual classes to store the parameters. So instead of a value_func and noise_func lambda function reference, you pass a reference to a value_func and noise_func class instance that has a virtual abstract member function
hmm...ok, well I want it to work in ANY version of Delphi, not just the latest versions using anonymous functions.

I'm not sure how those classes with virtual abstact members would look like? Any ideas?

Not full code, just some class names with method names...

cheers,
Paul