Files
why3/tests/python/fact.py
Jean-Christophe Filliatre 272e253a0f python: functions and predicates
2017-03-17 17:04:29 +01:00

8 lines
117 B
Python

def fact(n):
#@ ensures result >= 1
#@ variant n
if n <= 1:
return 1
return n * fact(n - 1)