You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, just a thought because I'm halfway through the koans and I'm pretty sure that I have missed a lot of class (?) functions because I wasn't writing them. The asserts might be more educational when inverted, i.e. instead of:
Thanks for the suggestion! Very interesting idea 💡
I would say that generally speaking, the goal of lessons like this is to encourage the learner to seek out the documentation for what is not understand and use that to produce an answer. The convenient thing about pure functions is that they are deterministic (did I get that right?). That is, in this example, there is exactly one result that is produced from the given input. In the proposed form, there are many inputs that produce the same result, e.g.
For that reason, I tend to think that the existing form is more concrete and therefore more enlightening. Additional examples might be included (like those listed above) to emphasize other truths, like for e.g. Map.merge overwrites existing values.
In fairness, this is my "right now" thoughts on this issue, and not necessarily based on the decision made at the time of writing the example(s).
Glad you've found this project useful! Thank you for the discussion.
Hi, just a thought because I'm halfway through the koans and I'm pretty sure that I have missed a lot of class (?) functions because I wasn't writing them. The asserts might be more educational when inverted, i.e. instead of:
it was:
Or something similar, so that when adding an answer, your eyes are drawn to the function being used.
Anyway, lovely resource, thanks for maintaining!
The text was updated successfully, but these errors were encountered: