Examples

CODE EXAMPLES

hello world example

Simple language


Zoea only uses a few concepts and has a very simple syntax so it is easy to learn.



      string concatenation example

      Test cases


      Behaviour is mainly described by examples of inputs and outputs - these are called test cases. Zoea works out how the input has been changed to produce the output to determine what code is needed.

      Conditional logic


      Multiple test cases can be used to describe more complex behaviour such as conditions. In this example how the result is calculated depends on whether the length of the input is odd or even.

      palindrome example

      Concise


      You can have as many test cases as you want but often you don't need many. Zoea’s simplicity makes it easy to understand what is going on.