Arc Forumnew | comments | leaders | submitlogin
1 point by rocketnia 4824 days ago | link | parent

Remember, you're in a lisp-2. Try this:

  (macrolet ((unless() nil)) (macp unless))  ; should be truthy
  (flet ((unless() nil)) (macp unless))      ; should be falsy
Come to think of it, I don't remember what problem we were trying to solve here. XD Functional position won't use regular local variables anyway....


1 point by akkartik 4824 days ago | link

Lol.

I have a macro called call. Given (call f arg), I would like to return:

if f is a local lambda, (call-fn f arg)

if f is a macro, (f arg)

otherwise, (call-fn f arg)

So yes, it probably isn't possible after all..

-----

1 point by rocketnia 4823 days ago | link

Hmm. Maybe you could shoot for two ssyntaxes, so that it's possible to explicitly override whatever the default rules would do:

  f.arg -> (call f arg)
  f@arg -> (f arg)

-----

1 point by akkartik 4823 days ago | link

Yeah, that may be a good option.

-----