Closed rewritten closed 9 months ago
@rewritten Thanks a lot for the fix. I've changed an approach and for just 2 options, I would prefer pattern matching as a faster way. In addition, I've changed the test description to follow an established format.
💜
The usual understanding, when a function accepts a keyword list as a last "options" argument, is that those options can be given in any order. On the other side, the current code pattern matches the list in exact order, so this expectation is not fulfilled, and this code raises a
FunctionClauseError
:This PR switches out the pattern matching on options, and uses appropriate
Keyword
functions to extract the values.