Left factorials: Difference between revisions
→Vectorization solution: Removed need to check for n=0.
ReeceGoding (talk | contribs) |
ReeceGoding (talk | contribs) (→Vectorization solution: Removed need to check for n=0.) |
||
Line 2,907:
leftFact <- function(numbs)
{
#As we will never actually use the numeric values of our outputs, we will
#
#
#As task 1 will demonstrate, the n=0 special case is covered.
sapply(numbs, function(n) as.character(
}
printer <- function(inputs) print(data.frame(Value = leftFact(inputs), row.names = paste0("!", inputs)))
|