tail recursion
[/teɪl rɪˈkɜːrʒən/]
nounpl: tail recursions
recursão em cauda
1. A type of recursion where a function calls itself as its final operation, allowing the compiler or interpreter to optimize the recursive call by reusing the current function's stack frame instead of creating a new one.
Tail recursion is an efficient way to implement loops in functional programming languages because it prevents stack overflow.
A recursão em cauda é uma forma eficiente de implementar loops em linguagens de programação funcional porque evita estouro de pilha.
2. A recursive function where the recursive call is the last operation executed in the function body, enabling tail call optimization.
The factorial function can be rewritten using tail recursion to improve performance.
A função fatorial pode ser reescrita usando recursão em cauda para melhorar o desempenho.
Tail recursion is a fundamental concept in functional programming and is particularly important in languages like Scheme, Lisp, and Scala that guarantee tail call optimization. In Brazil, this term is widely used in computer science courses and technical communities, especially among developers working with functional programming paradigms. The optimization technique is crucial for writing efficient recursive algorithms in performance-critical applications.
Look up more words on Fala2Me
The free English-Portuguese dictionary with real Brazilian accents, NYC slang, conjugator and more
Open Fala2Me →