Arc Forumnew | comments | leaders | submitlogin
3 points by CatDancer 5677 days ago | link | parent

If all the following lines go together as a group, and the arguments on the first line aren't part of that group, then I'll indent the following lines differently to emphasize the grouping:

  (each (k v) mytable
    (prn "my key is " k)
    (prn "and my value is " v))
It doesn't matter to me whether it's a macro or a function:

  (copy (obj a 1)
    'b 2
    'c 3)
I use the two space indentation a lot more with macros than I do with functions because many macros use the pattern of some arguments followed by a body and not many functions do, but I don't change my indentation depending on whether it's a function or a macro.

If the lines after the first line don't fall into their own group, then I'll line up the arguments:

  (+ '(a b c d)
     '(e f g h)
     '(i jk))

  (map (fn (x) ...)
       (generate-my-list ...))
For me the important consideration is using indentation to show which arguments go together.