With something that big, I will often:

- Move that function to its own new .rkt file.
- Move the inner functions out to the module level, too (as "siblings"
not "kids").
- Provide only the main one, e.g. `(provide process-elements)`.

As a bonus, now it's easier to exercise the helper functions in the REPL.

Of course, people have different feelings about more/smaller files vs.
fewer/bigger ones, so you may not love this idea depending where you
fall on that spectrum.

(I still do often define local helper functions, but generally for
very short 1- or 2-liner DRY things.)
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to