Skip to contents

This function lazily retrieves the total number of elements in a Cartesian product

Usage

get_size(l)

Arguments

l

A named list with the combinations of the Cartesian product.

Value

A number.

Examples

l <- list(color = c("Red", "Blue", "Yellow"),
          shape = c("Square", "Circle"))

get_size(l)
#> [1] 6