apply can work with just a function

For the Compleat Fan
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

apply can work with just a function

Post by cormullion »

I discovered by accident (and from ignorance) that apply doesn't always need a list if the function doesn't need one. So you can do this:

Code: Select all

(map apply '(directory real-path sys-info))
or something more useful. This is cool, and seems to work fine, even though the reference manual doesn't explicitly say that you can do it!

alex
Posts: 100
Joined: Thu Mar 10, 2005 2:27 pm
Location: Russia

Post by alex »

Undocumented NewLisp :)

Locked