Mian-Chowla sequence: Difference between revisions

→‎Functional Python: Replaced a more general `succ` function with an (Int -> Int)
(→‎Functional Python: Further simplification: Int in lieu of Tuple in until expression)
(→‎Functional Python: Replaced a more general `succ` function with an (Int -> Int))
Line 1,252:
 
 
# succ :: Enum a => aInt -> aInt
def succ(x):
'''The successor of a value. For numeric types,value (1 +).'''
return 1 + x if isinstance(x, int) else (
chr(1 + ord(x))
)
 
 
9,655

edits