The following function int -> int returns 1 for most inputs:
int -> int
1
let rec collatz n = if n <= 1 then 1 elif n collatz (n / 2) else collatz(3 * n + 1)
Is it equal to the constant function fun x -> 1?
fun x -> 1
Log in to submit your work and track progress.