Arc Forumnew | comments | leaders | submitlogin
1 point by almkglor 5924 days ago | link | parent

A way to determine if an optional parameter was specified:

  (def func ((o param nil param-specified))
    (if (param-specified)
       (do-this param)
       (do-that)))
My 'defpat macro (in the arc-wiki git on nex-3's site) helps amortize this lack:

  (defpat func
    (param)  (do-this param)
    ()       (do-that))
However, currently my defpat macro does not support initializing unspecified optional arguments.