Rx: operator for getting first and most recent value from an Observable stream
===

For an Rx based change tracking solution I am in need of an operator which can get me the first and most recent item in an observable sequence.

How would I write an Rx operator that produces the following marble diagram (*Note: the brackets are used just to lineup the items...I'm not sure how best to represent this in text*):

         xs:---[a  ]---[b  ]-----[c  ]-----[d  ]---------|
    desired:---[a,a]---[a,b]-----[a,c]-----[a,d]---------| 