Fixed thunk leak by changing foldrs to strict foldls.