Here documents with the #<# syntax fail with large inputs, because it creates a list of tokens and calls ##sys#print-to-string on them. When there are more than, what is it, 126 tokens, it fails. A fix is attached, which changes ##sys#print-to-string to a unary procedure and changes every call to it to reflect this (all two of them).