Given an Enumerable, I want to Take() all of the elements up to and including a terminator (throwing an exception if the terminator is not found). Something like:

```
list.TakeWhile(v => !condition(v)).Concat(list.Single(condition))

```

..except not crappy. Only want to walk it once.

Is this concisely possible with current operators in .NET 4 and Rx or do I need to write a new operator?

Writing the operator would take me less time than it did to write this question (though I think half that time would be figuring out what to name this function), but I just don't want to duplicate something that's already there.

**Update**

Ok, here's the operator. Very exciting, I know. Anyway, possible to build it from built-in operators?

```
    public static IEnumerable<T> TakeThroughTerminator<T>([NotNull] this IEnumerable<T> @this, Func<T, bool> isTerminatorTester)
    {
        foreach (var item in @this)
        {
            yield return item;
            if (isTerminatorTester(item))
            {
                yield break;
            }
        }

        throw new InvalidOperationException("Terminator not found in list");
    }

```