Post History
Haskell, 43 39 bytes f 1=0 f n=1+f([div n 2,n*3+1]!!mod n 2) Try it online!
Answer
#2: Post edited
# [Haskell], 43 bytes- <!-- language-all: lang-hs -->
f n|n<2=0|odd n=1+f(n*3+1)|0<1=1+f(div n 2)[Try it online!][TIO-kt9y74sk]- [Haskell]: https://www.haskell.org/
[TIO-kt9y74sk]: https://tio.run/##y0gszk7Nyfn/P00hrybPxsjWoCY/JUUhz9ZQO00jT8tY21CzxsDGEMxNySxTyFMw0vyfm5iZp2CrkJtY4KsRk6drV1BaElxS5JOnUppXnl@UUqwSXZyRX66Qp6Oka6ekA2KrAI2P1Yw21NMzNIj9DwA "Haskell – Try It Online"
- # [Haskell], <del>43</del> 39 bytes
- <!-- language-all: lang-hs -->
- f 1=0
- f n=1+f([div n 2,n*3+1]!!mod n 2)
- [Try it online!][TIO-ku1ffbp6]
- [Haskell]: https://www.haskell.org/
- [TIO-ku1ffbp6]: https://tio.run/##y0gszk7Nyfn/P03B0NaAK00hz9ZQO00jOiWzTCFPwUgnT8tY2zBWUTE3PwXE1/yfm5iZp2CrkJtY4KsRk6drV1BaElxS5JOnUppXnl@UUqwSXZyRX66Qp6Oka6ekA2KrAA2N1Yw21NMzNIj9DwA "Haskell – Try It Online"
#1: Initial revision
# [Haskell], 43 bytes <!-- language-all: lang-hs --> f n|n<2=0|odd n=1+f(n*3+1)|0<1=1+f(div n 2) [Try it online!][TIO-kt9y74sk] [Haskell]: https://www.haskell.org/ [TIO-kt9y74sk]: https://tio.run/##y0gszk7Nyfn/P00hrybPxsjWoCY/JUUhz9ZQO00jT8tY21CzxsDGEMxNySxTyFMw0vyfm5iZp2CrkJtY4KsRk6drV1BaElxS5JOnUppXnl@UUqwSXZyRX66Qp6Oka6ekA2KrAI2P1Yw21NMzNIj9DwA "Haskell – Try It Online"