I don't have the code handy, but the procedures typically looked like this:
(define (form-1234-line-22--foo-income-dollars) 234.00)
(define (form-1234-line-23--taxable-bar-income-dollars)
(max (+ (form-1234-line-22--foo-income-dollars)
(form-1234-line-21--baz-income-dollars)
(form-1234-schedule-x-line-10--total-blort-dollars))
0.00))
It was a lot of work, but (since I used error placeholders for many code paths my own data wouldn't exercise) not that much more work than I had to do anyway, for doing my returns with just the PDF forms and instructions. (The extra work came when I had to enter and double-check the form data manually in the official format, for this one-off exercise.)I did this exercise to see what it would look like, would it save me time/headache, and did it suggest anything about DSLs for this kind of work (say, for domain experts to codify and maintain something more formal and checkable than the form instructions or tax code).