# NOT RUN {
ipart <- icompositions(4)
ipart$getnext()
ipart$getnext(2)
ipart$getnext(layout = "column", drop = FALSE)
# collect remaining compositions
ipart$collect()
library(foreach)
foreach(x = icompositions(6, 2), .combine=c) %do% {
prod(x)
}
# }
Run the code above in your browser using DataLab