Mode:
Duration:
1
2
3
4
5
6
7
8
fn fact [n]{
if (math $n == 0) {
return 1
} else {
return (math $n * (fact (math $n - 1)))
}
}
echo (fact 5)Coding works best on desktop or with an external keyboard.
fn fact [n]{
if (math $n == 0) {
return 1
} else {
return (math $n * (fact (math $n - 1)))
}
}
echo (fact 5)Coding works best on desktop or with an external keyboard.
Calculates factorial of a number recursively.
fn fact [n]{
if (math $n == 0) {
return 1
} else {
return (math $n * (fact (math $n - 1)))
}
}
echo (fact 5)Elvish is a modern, expressive shell and scripting language designed for interactive use and automation. It emphasizes structured data, pipelines, modularity, and user-friendly syntax, combining features from traditional Unix shells with modern programming concepts.
Origin & Creator
Created by Jeffrey Shu, first released in 2014.
Industrial Note
Elvish is particularly useful in environments where shell automation, interactive data processing, and structured scripting pipelines are needed.