From d22b685b0135e0e36fa02b9e0f4336c6893d0b0f Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 9 Apr 2021 08:08:14 -0400 Subject: Fix some swapped identifiers --- doc/control.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/control.md b/doc/control.md index 782f1541..e65ee006 100644 --- a/doc/control.md +++ b/doc/control.md @@ -11,7 +11,7 @@ The surfeit of ways to write control structures could be a bit of an issue for r The useful control structures introduced here are collected as shortened definitions below. If ← {𝕏⍟𝕎@}´ # Also Repeat - IfElse ← {c‿F‿T: c◶T‿F@} + IfElse ← {c‿T‿F: c◶F‿T@} While ← {𝕨{𝕊∘𝔾⍟𝔽𝕩}𝕩@}´ # While 1‿{... to run forever DoWhile ← {𝕨{𝕊⍟𝔽𝔾𝕩}𝕩@}´ For ← {I‿C‿P‿A: I@ ⋄ {𝕊∘P∘A⍟C 𝕩}@} @@ -77,7 +77,7 @@ Despite the name, an if-else statement is most closely related to a [switch-case When using Choose, note that the natural ordering places the false case before the true one to match list index ordering. To get the typical if-else order, the condition should be negated or the statements reversed. Here's a function to get an if-else statement by swapping the conditions, and two ways its application might be written. - IfElse ← {cond‿False‿True: cond◶True‿False @} + IfElse ← {cond‿True‿False: cond◶False‿True @} IfElse ⟨𝕩