Mode:
Duration:
1
2
fact:{[n] $[n=0;1;n*fact[n-1]]}
fact[5]Coding works best on desktop or with an external keyboard.
fact:{[n] $[n=0;1;n*fact[n-1]]}
fact[5]Coding works best on desktop or with an external keyboard.
Calculates factorial of a number using K's functional style.
fact:{[n] $[n=0;1;n*fact[n-1]]}
fact[5]K is a high-performance, array-oriented programming language designed for financial and analytical applications. It provides concise syntax for working with large datasets, time-series data, and complex calculations, and is often used in conjunction with the kdb+ database system.
Origin & Creator
Developed by Arthur Whitney in the early 1990s, as a successor to APL and influenced by the language Q.
Industrial Note
K is primarily used in the financial industry, especially for high-frequency trading, quantitative research, and time-series analysis.