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
I think it would be a great idea to explain exactly what a method is right after introducing Objects. 99.next looks like magic. But if you show that it's actually a method that can look like this:
classIntegerdefnextself + 1endend
... it removes some of the mystery. Plus there are opportunities to use methods in later examples, like n bottles of beer on the wall. Why start with 99? Pass whatever you want into a method. Even better, recursive method.
The text was updated successfully, but these errors were encountered:
I think it would be a great idea to explain exactly what a method is right after introducing Objects.
99.next
looks like magic. But if you show that it's actually a method that can look like this:... it removes some of the mystery. Plus there are opportunities to use methods in later examples, like
n
bottles of beer on the wall. Why start with 99? Pass whatever you want into a method. Even better, recursive method.The text was updated successfully, but these errors were encountered: