# a21ecd9a88a0ce21f2a86de19a11d7ad5a13dcc07914c024b07da8cab3f84a15 Elan 1.6.1 guest default_profile valid

main
  print factorial(7)
end main

function factorial(n as Int) returns Int
  return (if n > 1 then n*factorial(n - 1) else 1)
end function

test 
  assert factorial(3) is 6
end test
