diff --git a/infra.bs b/infra.bs index 2ca1cc5..d4e8b02 100644 --- a/infra.bs +++ b/infra.bs @@ -134,6 +134,28 @@ as well as the single algorithm would. Therefore performance is best left as a f over. +

Variables

+ +

A variable is declared with "let" and changed with "set". + +

Let |list| be a new list.

+ +
+
    +
  1. Let |value| be null. + +

  2. If |input| is a string, then set |value| to |input|. + +

  3. Otherwise, set |value| to |input|, UTF-8 decoded. + +

  4. Assert: |value| is a string. +

+
+ +

Variables must not be used before they are declared. Variables are +block scoped. + +

Control flow

The control flow of algorithms is such that a requirement to "return" or "throw" terminates the