September 20, 2013
For Versus Repeat
I have been teaching my 5-year-old to draw pictures with turtlebits, and I have concluded that the
For example, he wrote this:
And he came to me saying "Dad, help me make it repeat 10 times." I told him to try to figure out a
for p in [1..10] play 'abcdefg'
But after we typed that, he clearly didn't understand what
We can eliminate the p and reduce it to three pieces of punctuation if we define a 'repeat' function:
repeat 10, -> play 'abcdefg'
However, in the ideal world,
repeat 10 play 'abcdefg'
I am thinking that maybe a a couple of these types of pedagogical insights should be accumulated into a fork of Iced Coffeescript. Anybody interested in helping me build a Coffeescript variant?Posted by David at September 20, 2013 08:32 AM
|Copyright 2013 © David Bau. All Rights Reserved.|