Recursion

297 views
Skip to first unread message

rosarioenz...@gmail.com

unread,
Jan 14, 2014, 11:32:55 AM1/14/14
to blo...@googlegroups.com
Hi all,
i'm a primary teacher in a italian school. I would like to express my heartfelt thanks to the developers of this project.

Is it possible to define a recursive function in Blockly? There is a factorial example?

Many thanks,
Rosario

Neil Fraser

unread,
Jan 14, 2014, 2:04:07 PM1/14/14
to blo...@googlegroups.com

Here is a recursively written factorial function:

https://blockly-demo.appspot.com/static/apps/code/index.html?lang=it#3yi8sn



--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Neil Fraser
http://neil.fraser.name

Ellen Spertus

unread,
Jan 14, 2014, 6:09:01 PM1/14/14
to blo...@googlegroups.com
Here's another, for those of us who prefer to avoid mutating our variables:

Reply all
Reply to author
Forward
0 new messages