Exercise 4-7

# 2)
as.numeric(list(list(1, 2), list(3, list(4)), 5))
## Error in eval(expr, envir, enclos): 'list' object cannot be coerced to type 'double'
as.numeric(unlist(list(list(1, 2), list(3, list(4)), 5)))
## [1] 1 2 3 4 5