R/helper.R
h_complete_list.RdExtends a list with an named element if the element does not exist
h_complete_list(ell, name, value)
| ell | list to be extended (usually an ellipsis as list(...)) |
|---|---|
| name | character with the name for the element to be added |
| value | value that will be stored in |
if ell already contained the element name, then
ell is returned without being modified. Otherwise, ell
is returned extended by a new element with name name and value
value.
#> $a #> [1] 1 #> #> $b #> [1] 2 #>sanityTracker:::h_complete_list(ell = ell, name = "d", value = Inf)#> $a #> [1] 1 #> #> $b #> [1] 2 #> #> $d #> [1] Inf #>