Powered by SourceForge   Home | About | Partners | Contact Us

XLR - The functional flavor of XL

0! -> 1
N! -> N * (N-1)!

Factorial in XLR

XLR is the functional variant of XL. It is intended to feel familiar to programmers who used languages such as Lisp, Scheme, Haskell, and to a certain extent Python or Ruby.

Key properties

XLR has the following standard features:

  • Dynamically compiled (using LLVM)
  • Lazy evaluation
  • Closures and anonymous "functions"

Meta-programming in XLR

if true then X else Y -> do X
if false then X else Y -> do Y

Adding "If-then-else" in XLR

XLR is based on XL, so it also offers advanced meta-programming capabilities:

  • Built on top of the common XL syntax and parse tree
  • A very simple syntax allowing tree rewrites
  • Various library utilities to manipulate source code