Michael Weber: Random Bits and Pieces

...Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical CAD, Modeling and Simulation, Natural Language, Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web Authoring just because these are the only things they happened to list.

Kent M. Pitman

Lisp Logo (by Conrad Barsky)

It amused me for while that I found myself writing something similar to the following piece of code:


(defun %apply (function arg &rest args)
  (apply #'apply function arg args))

(defun %funcall (function &rest args)
  (%apply function args))

I will leave it to you, dear reader, to figure out what the double APPLY is good for. Surprisingly, there is even some reason behind this madness, namely the ability to mangle the function argument before calling.