Product
prd x prd[x]
Where x is a numeric list, returns its product.
Nulls are treated as 1s.
q)prd 7 / product of atom (returned unchanged)
7
q)prd 2 3 5 7 / product of list
210
q)prd 2 3 0N 7 / 0N is treated as 1
42
q)prd (1 2 3 4;2 3 5 7) / product of list of lists
2 6 15 28
q)prd 101b
0b
q)prd "abc"
'type
prd is an aggregate function, equivalent to */.