1 | initial version |
The function is fine as long as the external variables y
and m
are defined in the way you expect (as var('y')
and var('m')
respectively). To ensure that a function works consistently (equal inputs always resulting in equal outputs), it should not depend on external variables. So you can modify the function to use var('y')
and var('m')
directly, or change the definition to accept y
and m
as parameters (and making sure to always pass in the correct ones).