We need a new name for this kind of thing[1] because it's not really literate programming - you can't re-order your code blocks in the literate source files and have them come out in the right place in the code source files which is, I think, a key part of it being literate programming. Don't get me wrong - I use this a lot with the various *occos - but it needs a name of its own.
[1] Assuming we don't already have one that I've missed.
Of course Haskell has had its “literate format” since forever (ETA: the Haskell 1.2 report[2], dated March 1992, has a description in an appendix), and it became mildly popular for Haskell blogging when blogs caught on, but its name was always accompanied by a side note that in Haskell you don’t really need to reorder things (kind of true).
[1] https://github.com/jashkenas/docco/commit/9b666b77c476fd76b9...
[1] https://perldoc.perl.org/perlsyn#PODs:-Embedded-Documentatio...
McIlroy also touches on this in his review, though from the other direction:
> Perhaps the greatest strength of WEB is that it allows almost any sensible order of presentation. Even if you did not intend to include any documentation, and even if you had an ordinary cross-referencer at your disposal, it would make sense to program in WEB simply to circumvent the unnatural order forced by the syntax of Pascal.
[1] Of “Knuth v McIlroy” fame: https://homepages.cwi.nl/~storm/teaching/reader/BentleyEtAl8...
(Though, writing a function long enough that you might want to declare a variable part-way through it would probably be a code smell in Forth...)
There’s an old tradition of annotating Forth code with documentation: code would go into even-numbered 64x16-character “blocks”, accompanying documentation into odd-numbered “shadow blocks”, and on e.g. a VGA you could even view them at the same time.