The Fabl Manual
Function Index
Class Index
Globals Index
Libraries
Contents

Title Page
Introduction
Sample Code
Architecture
Syntax
Strong Typing
Polymorphism
Operators
Help
Errors
Configuration
RDF
Namespaces
Owl
Datatypes
Resources
Dot ops
Coercion
Type Casting
nil

Types
string
id
int
double
boolean
Literal
Containers
Functions
void

Home
Regarding
The Path
Classes
Delegation
Functional Values
Read/Write
Load/Store
Libraries
Imports
CGI
Functions

For Fabl types <O>,<I0,>,<I1,>...<In>,

Function(<O>,<I0,>,<I1,>...<In>)

is the type of all functions that take inputs of types <I0,>,<I1,>...<In> and return values of type <O>. For example, the type of

string function example(string seed,int a) 
{ 
return "{seed}_{a}";
}

is

Function(string,string,int)
One common use of function types is forward declarations:

var Function(int,int) factorial;

int function factorial(int n)
{
  if (n <= 1) return 1;
  return n * factorial(n-1);
}

Fabl functions are first-class objects which can be passed as arguments to other functions, and can appear as the values of properties. Details appear in a later section.