some quick documentation about func call and apply
Moving map to using apply, centralising function call logic
Moving for-each to also use apply
Correcting error handling in map and for-each