racket / redex

Other
93 stars 36 forks source link

reuse some standard functions; eliminate multiple passes in a few places #169

Closed philnguyen closed 3 years ago

philnguyen commented 6 years ago

This commit attempts to clean up and micro-optimize some by:

rfindler commented 6 years ago

Are these changes covered by the existing test suites?

philnguyen commented 6 years ago

Not that I'm aware of :D. I did a search for search/next and it didn't seem to be directly tested. Are functions in this module indirectly tested by tests on judgment-form-based random generation? I can try adding some tests if there are guidelines about how these functions with random behaviors are tested.

Otherwise it's not really important. I was just interested in how this thing is tuned in practice and made some edits along the way to help myself understand.

rfindler commented 6 years ago

Thanks, @philnguyen. I'll look into testing the changes more carefully later on; they look good to me, but I wouldn't want to merge them without being able to rely on just our eyes looking at the code.

rfindler commented 3 years ago

Indeed, the existing test suites get to all of the functions that are changed.

Thanks!!