(def the-example (value1 value2 value3 value4) (or= value1 'Results) (or= value2 'wahoo!) (or= value3 'ugh!) (or= value4 'omg!) (prn "Value1: " value1) (prn "Value2: " value2) (prn "Value3: " value3) (prn "Value4: " value4) )
(mac defaults args `(do ,@(pair args (fn (var val) `(or= ,var ,val))))) (def the-example (value1 value2 value3 value4) (defaults value1 'Results value2 'wahoo! value3 'ugh! value4 'omg!) (prn "Value1: " value1) (prn "Value2: " value2) (prn "Value3: " value3) (prn "Value4: " value4))
-----