F# generally uses structural comparisons. However, NUnit does not, especially when working with general .NET types like ArraySegment. This operator tests the structural sameness of two array segments. The goal is not to have identical ArraySegment instances or even two instances using the same underlying array, as most tests are recreating the array as well for readability. These will likely be refactored once the ArraySegmentPrimitives are refactored to always use the same underlying buffer.

These are intended to be used in single-threaded event loop state machines (a mouthful) which share a single, segmented memory buffer. Given the specificity of the intended target, this may best be removed. However, it also serves as an example of how one might extend the core functionality of the cashel Parser monad.

Combinators matching more than one value should ideally be typed as Parser<ArraySegment<'a> list, ArraySegment<'a> list>. This begins looking hairy, but it matches the intent: keep the values in the original buffer and provide a way to access them. One might presume that a single ArraySegment<'a> is all that's necessary; however, you quickly lose the ability to skip characters that are not needed, and the combinations further up the parse may not match anymore.

So I finally got around to checking out your latest pull request. I'm not 100% sold on FAKE (and the build script needs some cleanup), but I like most of your changes. Question: why did you add ParserBuilder.ReturnFrom, map, unfold and <*>? As far as I can tell, these aren't used anywhere inthe project and have no tests. I assume you added them for a reason?

Yikes. I thought I had tests for those at some point. I was using them in one of my projects and thought that was the best place to put them, but I should have double-checked that the tests were there. Apologies for that. I'll try to add them soon.