Haskell's Composable Splitting Combinators

Splitting with PARSE is possible (Rebol SPLIT generates parse rules):

>> parse "your words here" [
       collect try some further keep between <here> [space | <end>]
   ]
== ["your" "words" "here"]

Using the default behavior, seems at minimum you'd need the COLLECT and KEEP combinators...gets wordy. (Note: Not the same as the lambda-based COLLECT and KEEP... needs to handle "rollback" on failed rules.)

So it seems to be its own domain... though maybe it could use the UPARSE engine just with a different combinator set and an implicit COLLECT. Definitely worth taking a look at.

But.. lots of other things in the air right now to consider, so I just wanted to put a pin in it... :pushpin: I've ignored SPLIT for a decade now, it can wait a little longer :slight_smile:

1 Like