The recursive function ought to be fine until you decide to generate William Faulkner sentences. Or maybe James Joyce. Funny coincidence: if you look up Longest English Sentence in Wikipedia, the last paragraph talks about recursion.
recur doesn't consume the stack, and I don't see anything else that would. But I do think that it would read better if it used iterate over pick-next-word rather than loop...recur.
2
u/satayboy Oct 06 '15
The recursive function ought to be fine until you decide to generate William Faulkner sentences. Or maybe James Joyce. Funny coincidence: if you look up Longest English Sentence in Wikipedia, the last paragraph talks about recursion.