3 ms·
In a BASIC- or COBOL-like language, that would be something roughly like: PUBLIC FUNCTION Search \ GIVEN REGION Searching \ TAKING Query: SHARED Str,
by 0815test 7y ago
In a BASIC- or COBOL-like language, that would be something roughly like:
PUBLIC FUNCTION Search \
GIVEN REGION Searching \
TAKING Query: SHARED Str, \
Contents: SHARED Str REGION Searching \
GIVING Vector OF SHARED Str REGION Searching IS
TAKE Vector!Empty
END FUNCTION.
It might look like an improvement if you're seeing Rust-like code for the first time ever, but it very much isn't one in the longer run! Even the final version of that function might be somewhat tedious to write and review, to say nothing of something even slightly longer than that!