createList creates a list of length n for memoized fibonacci

createList(n)

Arguments

n

an integer

Value

a n-length list with 1 as the first two elements, and -1 for the rest

Examples

createList(10)
#> [[1]] #> [1] 1 #> #> [[2]] #> [1] 1 #> #> [[3]] #> [1] -1 #> #> [[4]] #> [1] -1 #> #> [[5]] #> [1] -1 #> #> [[6]] #> [1] -1 #> #> [[7]] #> [1] -1 #> #> [[8]] #> [1] -1 #> #> [[9]] #> [1] -1 #> #> [[10]] #> [1] -1 #>