Skip to content
rookieMP edited this page Sep 24, 2011 · 8 revisions

FACT is currently in the process of being completely rewritten. The current code sucks.

Welcome to the FACT wiki! FACT is a concurrent, "scope-oriented" programming language which hopes to combine many aspects of procedural languages with object-oriented languages, without the burden of extra syntax. The name FACT stands for "Functions Are Classes Too." FACT is very similar to many functional languages; but one major difference is that in FACT scopes are completely mutable.

For a guide on using FACT, view How-to-use-FACT.

Here's a tail-recursive factorial example. Note that in the next release the syntax will be dramatically different:

defunc
factorial @ (def x)
{
  return $(defunc
           fact_rec @ (def x, def n)
           {
             if (n > 1)
               return $(fact_rec, x * n, n - 1);
             else
               return x;
           }, x, x - 1);
}

Clone this wiki locally