<blocksapp="Snap! 4.0, http://snap.berkeley.edu"version="1"><block-definitions="cases: if %'test' then %'result' %'more'"type="command"category="control"><header></header><code></code><inputs><inputtype="%b"></input><inputtype="%cs"></input><inputtype="%mult%boolUE"></input></inputs><script><blocks="doIfElse"><blockvar="test"/><script><blocks="doRun"><blockvar="result"/><list></list></block></script><script><custom-blocks="catch %upvar %cs"><l>tag</l><script><custom-blocks="for each %upvar of %l %cs"><l>item</l><blockvar="more"/><script><blocks="doIf"><blocks="evaluate"><blockvar="item"/><list></list></block><script><custom-blocks="throw %s"><blockvar="tag"/></custom-block></script></block></script></custom-block></script></custom-block><blocks="doHideVar"><l>test</l></block></script></block></script></block-definition><block-definitions="catch %'tag' %'action'"type="command"category="control"><header></header><code></code><inputs><inputtype="%upvar"></input><inputtype="%cs"></input></inputs><script><blocks="doCallCC"><blocks="reifyScript"><script><blocks="doSetVar"><l>tag</l><blockvar="cont"/></block><blocks="doRun"><blockvar="action"/><list></list></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definitions="throw %'cont'"type="command"category="control"><header></header><code></code><inputs><inputtype="%s">catchtag</input></inputs><script><blocks="doRun"><blockvar="cont"/><list></list></block></script></block-definition><block-definitions="for each %'item' of %'data' %'action'"type="command"category="lists"><header></header><code></code><inputs><inputtype="%upvar"></input><inputtype="%l"></input><inputtype="%cs"></input></inputs><script><blocks="doUntil"><blocks="reportEquals"><blockvar="data"/><blocks="reportNewList"><list></list></block></block><script><blocks="doSetVar"><l>item</l><blocks="reportListItem"><l>1</l><blockvar="data"/></block></block><blocks="doRun"><blockvar="action"/><list><blocks="reportListItem"><l>1</l><blockvar="data"/></block></list></block><blocks="doSetVar"><l>data</l><blocks="reportCDR"><blockvar="data"/></block></block></script></block></script></block-definition><block-definitions="else if %'test' then %'action'"type="predicate"category="control"><header></header><code></code><inputs><inputtype="%b"></input><inputtype="%cs"></input></inputs><script><blocks="doIfElse"><blockvar="test"/><script><blocks="doRun"><blockvar="action"/><list></list></block><blocks="doReport"><blocks="reportTrue"></block></block></script><script><blocks="doReport"><blocks="reportFalse"></block></block></script></block></script></block-definition><block-definitions="else %'action'"type="predicate"category="control"><header></header><code></code><inputs><inputtype="%cs"></input></inputs><script><blocks="doRun"><blockvar="action"/><list></list></block><blocks="doReport"><blocks="reportTrue"></block></block></script></block-definition></blocks>