Fibonacci n-step number sequences: Difference between revisions

Content added Content deleted
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
Line 4,816: Line 4,816:
</pre>
</pre>


=={{header|Vlang}}==
=={{header|V (Vlang)}}==
{{trans|Wren}}
{{trans|Wren}}
<syntaxhighlight lang="vlang">fn fib_n(initial []int, num_terms int) []int {
<syntaxhighlight lang="v (vlang)">fn fib_n(initial []int, num_terms int) []int {
n := initial.len
n := initial.len
if n < 2 || num_terms < 0 {panic("Invalid argument(s).")}
if n < 2 || num_terms < 0 {panic("Invalid argument(s).")}