Hi again Dan. Question about this formula you wrote. I don’t understand the notation.
sum(k -> loops(n,k), 1:n) == factorial(n)
sum(k->loops(n,k), 1:n) mean? Is something ranging from
loops(n,k)? Also, what is this
sum iterates over a collection, applies a function to each element, and sums the results from the function.
k->loops(n,k) is an anonymous function of
k that returns
1:n is a range, and is the collection that
sum iterates. The result here is
loops(n,1) + loops(n,2) + ... + loops(n,n)