now the simple factorial correctly compiles

function fact(n) = if n then n * fact(n-1) else 1