Given a list of arbitrary data, I'd like to be able to say "look through the list for X and Y; give me everything between them." Ideally there would be a way to specify inclusive/exclusive on that.
Example: (between-items '(a b c d e f) 'b 'e) => '(b c d e) Ideally it would also have a simple method for specifying which, if either, of the predicate-triggering items should be included in the return value. That way you could do: Example: (between-items '(a b c d e f) 'b 'e #:start #f) => '(c d e) Example: (between-items '(a b c d e f) 'b 'e #:end #f) => '(b c d) Example: (between-items '(a b c d e f) 'b 'e #:start #f #:end #f) => '(c d) I could write this manually, but I wonder if there is a simple Racket way? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.