Apply is a fun function it runs a given function with the given arguments.
(apply function argList)
Some uses are saving functions for later use. (like saving the functions in a list to apply them later)
A cool use is working with lists of numbers. Say you wanted the sum of all the numbers in a list all you would have to do is (apply add numberList) and it will return the sum.
fun with apply
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Crying is not a proper retort!