# Code generation, simple example of recursion
func rec(a: int): int
   write a;
   if a >= 2 then
      return (a-1) + rec(a-1);
   return 0;
end rec

write rec(10);
