[<<][compsci][>>][..]
Tue Jan 19 08:24:53 CET 2010

Functional programming with GNU Make

GNU make's "call" is Scheme's "apply".  However, I don't see if
lexically nested procedures are possible.  I guess this would require
proper quoting/unquoting (functions are represented as strings).

More specifically

VAR = value    <->  (define VAR (lambda () value))
VAR := value   <->  (define VAR value)

The former is a recursively expanded, while the latter is a simply
expanded variable.  The analogy with a lambda thunk isn't completely
correct, as it depends on how is applied.  I.e.

VAR = ... $(1) ... $(2) ...  <-> (define VAR (lambda (v1 v2) ... v1 ... v2 ...))

To invoke : $(call VAR,arg1,arg2)


[1] http://lambda-the-ultimate.org/node/85
[2] http://okmij.org/ftp/Computation/Make-functional.txt
[3] entry://20100112-083855



[Reply][About]
[<<][compsci][>>][..]