Jump to content

Padovan n-step number sequences: Difference between revisions

m
→‎{{header|AppleScript}}: Negative values of N explicitly excluded.
(→‎Python: Functional: Scrupulously idiomatic. Thoroughly linted. This is a) vandalism, and b) not adult behaviour. Get some help.)
m (→‎{{header|AppleScript}}: Negative values of N explicitly excluded.)
Line 167:
end if
unfoldr(recurrence,if take(10 +> n, seed))then
{}
else
unfoldr(recurrence, take(1 + n, seed))
end if
end padovans
 
Line 185 ⟶ 189:
end |λ|
end script
fTable("Padovan N-step Series:", str, justified, ¬
Line 397 ⟶ 400:
set c to class of xs
if list is c then
ifset 0lng <to nlength thenof xs
if 0 < items 1 thru min(n, lengthand of0 xs)< oflng xsthen
items 1 thru min(n, lng) of xs
else
{}
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.