Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1644 +/- ##
==========================================
- Coverage 91.48% 91.48% -0.01%
==========================================
Files 67 67
Lines 10009 9989 -20
==========================================
- Hits 9157 9138 -19
+ Misses 852 851 -1
🚀 New features to boost your workflow:
|
| let max_dist s = | ||
| let length = String.length s in | ||
| if length < 2 then 0 else if length < 10 then 2 else 4 in |
There was a problem hiding this comment.
This is correct translation of the previous code but edge cases don't really make much sense. Two-character identifier shouldn't allow two edits, and the transition from 2 to 4 feels a bit sudden. Might be better to just calculate the maximum distance as length divided by two, rounded down, but no larger than 4.
There was a problem hiding this comment.
I like the simpler criteria. I added it, with the extra caveat that I decided to base it on the length minus the length of any known suffix like _lpdf, since foo_lupdf getting 4 characters of leeway led to some weirder test results
| A returning function was expected but an undeclared identifier "if_else" was supplied. | ||
| Did you mean "inverse"? |
There was a problem hiding this comment.
Ha ha, close enough I guess.
Follow on to #1631, #1643: The OCaml standard library now includes direct replacements for a few things we wrote ourselves or needed dependencies for:
Common.Let_syntax.[Result | Option]: replaced byStdlib.[Result | Option].SyntaxEnvironment.Distance:Stringnow has aspellcheckfunctionOut_channelandIn_channelfrom stdio have sufficient stdlib replacementsSubmission Checklist
Release notes
Copyright and Licensing
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)