kopia lustrzana https://github.com/backface/turtlestitch
Fix typo in SUM help (variadic-reporters.xml)
rodzic
8e7a9a4bef
commit
19fe688e08
|
@ -1 +1 @@
|
|||
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="sum %'nums'" type="reporter" category="operators"><comment x="0" y="0" w="202" collapsed="false">Takes any number of numbers as inputs (use the left and right arrowheads to adjust the number of input slots) and reports the result of adding them all, so
ISUM (4) (100) (8))
reports 112.</comment><code></code><inputs><input type="%mult%n"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="nums"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><l>0</l></block></script></block><block s="doReport"><block s="reportSum"><block s="reportListItem"><l>1</l><block var="nums"/></block><custom-block s="sum %mult%n"><block s="reportCDR"><block var="nums"/></block></custom-block></block></block></script></block-definition><block-definition s="product %'nums'" type="reporter" category="operators"><comment x="0" y="0" w="205" collapsed="false">Takes any number of numbers as inputs (use the left and right arrowheads to adjust the number of input slots) and reports the result of multiplying them all, so
(PRODUCT (4) (100) (8))
reports 3200.</comment><code></code><inputs><input type="%mult%n"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="nums"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><l>1</l></block></script></block><block s="doReport"><block s="reportProduct"><block s="reportListItem"><l>1</l><block var="nums"/></block><custom-block s="product %mult%n"><block s="reportCDR"><block var="nums"/></block></custom-block></block></block></script></block-definition><block-definition s="all of %'preds'" type="predicate" category="operators"><comment x="0" y="0" w="248" collapsed="false">Takes any number of Boolean (true/false) inputs (use the left and right arrowheads to adjust the number of input slots) and reports TRUE only if all of the inputs are TRUE, otherwise FALSE. Like AND but for multiple inputs.</comment><code></code><inputs><input type="%mult%boolUE"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="preds"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportTrue"></block></block></script></block><block s="doReport"><block s="reportAnd"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="preds"/></block><list></list></block><custom-block s="all of %mult%boolUE"><block s="reportCDR"><block var="preds"/></block></custom-block></block></block></script></block-definition><block-definition s="any of %'preds'" type="predicate" category="operators"><comment x="0" y="0" w="240" collapsed="false">Takes any number of Boolean (true/false) inputs (use the left and right arrowheads to adjust the number of input slots) and reports TRUE if at least one input is TRUE, otherwise FALSE.</comment><code></code><inputs><input type="%mult%boolUE"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="preds"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportFalse"></block></block></script></block><block s="doReport"><block s="reportOr"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="preds"/></block><list></list></block><custom-block s="any of %mult%boolUE"><block s="reportCDR"><block var="preds"/></block></custom-block></block></block></script></block-definition></blocks>
|
||||
<blocks app="Snap! 4.2, http://snap.berkeley.edu" version="1"><block-definition s="sum %'nums'" type="reporter" category="operators"><comment w="202" collapsed="false">Takes any number of numbers as inputs (use the left and right arrowheads to adjust the number of input slots) and reports the result of adding them all, so
(SUM (4) (100) (8))
reports 112.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%n"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="nums"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><l>0</l></block></script></block><block s="doReport"><block s="reportSum"><block s="reportListItem"><l>1</l><block var="nums"/></block><custom-block s="sum %mult%n"><block s="reportCDR"><block var="nums"/></block></custom-block></block></block></script></block-definition><block-definition s="product %'nums'" type="reporter" category="operators"><comment x="0" y="0" w="205" collapsed="false">Takes any number of numbers as inputs (use the left and right arrowheads to adjust the number of input slots) and reports the result of multiplying them all, so
(PRODUCT (4) (100) (8))
reports 3200.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%n"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="nums"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><l>1</l></block></script></block><block s="doReport"><block s="reportProduct"><block s="reportListItem"><l>1</l><block var="nums"/></block><custom-block s="product %mult%n"><block s="reportCDR"><block var="nums"/></block></custom-block></block></block></script></block-definition><block-definition s="all of %'preds'" type="predicate" category="operators"><comment x="0" y="0" w="248" collapsed="false">Takes any number of Boolean (true/false) inputs (use the left and right arrowheads to adjust the number of input slots) and reports TRUE only if all of the inputs are TRUE, otherwise FALSE. Like AND but for multiple inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%boolUE"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="preds"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doReport"><block s="reportAnd"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="preds"/></block><list></list></block><custom-block s="all of %mult%boolUE"><block s="reportCDR"><block var="preds"/></block></custom-block></block></block></script></block-definition><block-definition s="any of %'preds'" type="predicate" category="operators"><comment x="0" y="0" w="240" collapsed="false">Takes any number of Boolean (true/false) inputs (use the left and right arrowheads to adjust the number of input slots) and reports TRUE if at least one input is TRUE, otherwise FALSE.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%boolUE"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="preds"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doReport"><block s="reportOr"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="preds"/></block><list></list></block><custom-block s="any of %mult%boolUE"><block s="reportCDR"><block var="preds"/></block></custom-block></block></block></script></block-definition></blocks>
|
Ładowanie…
Reference in New Issue