Post History
Raku, 19 bytes {(|@_,*-*...0>*)-1} Try it online! { } # Anonymous code block ... # Create a sequence |@_ # Starting with the input ...
#1: Initial revision
# [Raku], 19 bytes
<!-- language-all: lang-perl6 -->
{(|@_,*-*...0>*)-1}
[Try it online!][TIO-khldvh9f]
[Raku]: https://github.com/nxadm/rakudo-pkg
[TIO-khldvh9f]: https://tio.run/##TcpNCsIwEIbhvaeYlbSlGSY/te2ixXuEIIINCK2VZCFFPZk7LxbTiOAHs5iH9zq4cRemBbYWunDPHvtDWbACEakvcsafwR8XsBlqMiVqbnLoekAtDNjZwXi@DP79wtvsTj5AHBcEUHNIqzaJKL5KfEkmqihWqm0TqUSyqWMK/5WMx7hoEvGVmPj5OvoA "Perl 6 – Try It Online"
~~~
{ } # Anonymous code block
... # Create a sequence
|@_ # Starting with the input
,*-* # With each element being the difference between the previous two
0>* # Until it is negative
( )-1 # And return the length of the list minus one
~~~
