> On Jan 24, 2018, at 7:38 PM, Joel Dueck <dueckofe...@gmail.com> wrote: > > I found that, conveniently, the #:txexpr-proc will match the ◊fn tags in the > same order a left-to-right reader would encounter them in the text, > regardless of nesting. If I had given it more thought, I might have figured > out that Pollen does the same with the entire doc.
Right. Racket guarantees left-to-right evaluation (though I can't find the docs link for this right now). As you say, the way to think about it is to imagine how it looks as an X-expression, and the evaluation will go in the same order (pre-order depth-first traversal, I believe is the fancy term) > (+ 1 (index-of (remove-duplicates (reverse fn-names)) name)) FWIW this is the same as `(length (member name fn-names))` if you avoid putting duplicates in `fn-names` to begin with. `member` returns the tail of the list beginning with the matching item. So in this case, you'd get a list of the footnote refs from the target name to the beginning (because the list is being accumulated in reverse) I apologize if I exploded part of your blog post. Occasional unfortunate side effect of being a curious character. May we be united in the quest for knowledge ;) -- You received this message because you are subscribed to the Google Groups "Pollen" group. To unsubscribe from this group and stop receiving emails from it, send an email to pollenpub+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.