Create a function that returns an array containing the first `l` digits from the `n`th diagonal of [Pascal's triangle](https://en.wikipedia.org/wiki/Pascal's_triangle).
`n = 0` should generate the first diagonal of the triangle (the 'ones'). The first number in each diagonal should be 1.
If `l = 0`, return an empty array. Assume that both `n` and `l` will be non-negative integers in all test cases.
from functools import lru_cache

def generate_diagonal(nn, l):
    @lru_cache(None)
    def calc(n, ll):
        if n == 0 or ll == 1: return 1
        elif n < 0: return 0
        return calc(n - 1, ll) + calc(n, ll - 1)
    return [calc(nn, i) for i in range(1, l+1)]
from functools import lru_cache

def generate_diagonal(nn, l):
    @lru_cache(None)
    def calc(n, ll):
        if n == 0 or ll == 1: return 1
        elif n < 0: return 0
        return calc(n - 1, ll) + calc(n, ll - 1)
    return [calc(nn, i) for i in range(1, l+1)]