fun with apply

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

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.
Crying is not a proper retort!
Post Reply