# 3d2656d1a85adbf8e7944155b7c18553df3164a76996d4f566e3aa6545a8d335 Elan 1.6.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
