F # (, , ), , memoize2 memoization ( ), counter), :
let rec counter = memoize2 (fun init count ->
if init = 1 then count + 1 else
match init with
| Even value -> (counter (value/2) (1 + count))
| Odd value -> (counter ((3 * value) + 1) (count+1)) )
, , , F # . FS0040, , ( , ), , , ). , #nowarn "40".