Wafl Home

Program Structure Tutorial

Program Structure

Programming language Wafl is functional programming language. Semantically, programs have the expression form. There are no variables, assignments, iterations, procedures and many other elements usual in imperative programming languages. Program processing flow is not explicitly determined by the program source file, but by implicitly defined rules for expression processing. Thus, in Wafl terminology, programs are not executed but evaluated.

Basic building elements of Wafl programs are local definitions, conditional expressions and recursion.

Some of most important concepts in Wafl programming are strong type checking, automatic type inference, polymorphism, higher order functions and partial application.

Dot function calls and functional operators application are important syntactical features that strongly influence the applicability and readability of Wafl programs.

 

Table of Contents

Let's Start

Program Structure

Primitive Data Types

List

Tuple

Record

HTML

Command Line Interpreter

Using Web Servers

Syntax

Examples

Tips

The most of examples evaluates with both command line and Web server Wafl interpreters. If any example is based on specific features of an interpreter, it is explicitly annotated.