Closed ctstacey closed 3 years ago
After further consideration, I think the text is correct. We are using test/2 in the code, so I made the link mirror that (although it will point to the exact same place!).
:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:
Hi Jose, Thanks for considering my pull request. Perhaps I misunderstood the meaning of test/2. Does this mean we are calling the function with 2 arguments, or the function expects two arguments, and how do default arguments effect the arity of the function? Thanks in advance, Charles.
If you call test(foo, bar), then you are calling test/2, with two arguments. It happens that the test macro, with default arguments, is defining both test/2 and test/3. :)
Oh nice! Thank-you! Am I right in assuming the definition of test/2 and test/3 happen in the compiler (at compile time)? (I was looking but couldn't find anything that explains this in the documentation)
Correct.
Thanks! Have a great day! 💚 💙 💜 💛 ❤️
"doctest/1" ->"doctest/2" "test/2" ->"test/3"