Arc Forumnew | comments | leaders | submitlogin
3 points by mattjones 6160 days ago | link | parent

I think this is a good abstraction. Brevity is important since the amount of logic being abstracted away isn't very much, and I think this achieves it.

You could do the same thing using just one lambda:

    (def bst-elts (b)
      (accum a (trav b (fn (x)
                           (self x!l)
                           (a x!d)
                           (self x!r)))))
That works fine and in some situations (with more complicated logic) it might be better. But the shorter version is compelling to me because brevity is so important in this case.