Opaque code - pascal's triangle

I saw this solution to pascal’s triangle on exercism and have no idea what the last line (push!(…)) is doing - could someone please explain - or translate the code into english?

function triangle(n::Int)
    n<0 && throw(DomainError("Negative row"))
    n==0 && return []
    n==1 && return [[1]]
    t=triangle(n-1)
    push!(t, [t[end];0]+[0;t[end]])
end

Hmm … of course I worked it out now

[ [1, 2]; 0 ] == [ [1, 2, 0] ]
[ 0; [1, 2] ] == [ [0, 1, 2] ]

1 Like