3 ms·
If you think of every integer as being a product of some other integers, e.g. the product of [a,b,c] then you could say the algorithm for that is: take the firs
by anaphor 13y ago
If you think of every integer as being a product of some other integers, e.g. the product of [a,b,c] then you could say the algorithm for that is: take the first number of the list, multiply it with the product of the rest of the numbers, when you get to an empty list, just apply the empty product, which is 1 for obvious reasons (1a is identity). So then [p] = p1. Then by this definition [] has no factors, it's the empty product. Of course you don't have to think of it like this, but it might be useful to do so.