mirror of
https://github.com/Cian-H/dotfiles.git
synced 2025-12-25 12:31:56 +00:00
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
12 lines
278 B
Nu
12 lines
278 B
Nu
|
|
# Simple countdown counter from some number n to 0. Returns 0 at end
|
|
# Designed to be used with the tramp module to avoid stack overflows via the
|
|
# use of the Trampoline method.
|
|
def countdown [n: int] -> int {
|
|
if $n == 0 {
|
|
0
|
|
} else {
|
|
{|| countdown ($n - 1) }
|
|
}
|
|
}
|