# 863f21b83d1b2bfca0f75de5451251ec52c5d9966dd1215b9613c6597caf6adf Elan 1.8.2 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
