3 ms·
Haskell has “otherwise” as a built in constant that equals true. It reads better in some cases. f n | odd n = 3 * n + 1 | otherwise = n \\ 2
by undreren 5y ago
Haskell has “otherwise” as a built in constant that equals true. It reads better in some cases.
f n | odd n = 3 * n + 1
| otherwise = n \\ 2