im trying to get the kth row in every list in the pascal list. For example pascal 4 would get the 4nd element in every row. So it would return 1,4,10,20... etc. I understand how to construct an infinite pascal list which is what outputs below, but im unsure of how to get a nth element in each nested list. any suggestions? i was thinking of using map, but im not necessarily mapping a function here which is throwing me off a bit. thank you.
// im trying to get pascal k to return the nth element of every row in the triangle
pascal n = map(\n -> ??) take n pascal
pascal_infite = [1] : map (\l -> zipWith (+) (l ++ [0]) (0:l)) pascal_infinite