News for hackers. Stuff that matters.
Re:Dynamic programming in Haskell: automatic memoization by kccqzy on Tuesday June 20, 2023 @12:29PM (#36406539)
Right. Personally I'd be much happier using an STRef. The code is much more explicit.
Re:Dynamic programming in Haskell: automatic memoization by throwaway81523 on Tuesday June 20, 2023 @06:34PM (#36411652)
The trouble then is that you have to wrap the memoized function and everything that uses it in the ST monad. Lazy evaluation is completely pure.