Merge successive strings
#12
Closed
opened 6 years ago by sanchom
·
6 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Would this function be an appropriate addition to this package?
https://github.com/sanchom/sanchom.github.io/blob/master-source/util.rkt
Under what circumstances would one need to
merge-successive-strings
?I don’t think I understand what it claims to do:
Oh, it's a shallow list traversal instead of a deep xexpr traversal.
I've needed to use it several times when programatically building up the
elements of a txexpr, several of which are strings, but some of which are
nested txexprs (like an em). In order for later processing to have an easy
time, it is helpful to put all the adjacent strings together into single
strings.
On Tue., Jun. 18, 2019, 11:49 Alex Knauth, notifications@github.com wrote:
I think not, because it doesn’t specially pertain to txexprs. Yes, this is one of many functions that operate on strings and lists that are conceivably useful with txexprs, though the
txexpr
library cannot hope to warehouse them all. Why not include it with your citation package?BTW I follow this rule of thumb. I too have written many of these kinds of list-manipulation functions. I ended up generalizing the repeating patterns in
sugar/list
, likeslicef
below:Okay, that sounds right. And thanks for the refactor!