Idiomatic F# for iterating a seq and mapping whenever changes occur on a given selection
|&gt; Seq.map(fun state -&gt; fst state, snd state)


I think this last operation is unnecessary as it is a map from 'a * 'b to 'a * 'b (fst returns the first element in the tuple and snd the second).



If you want to get rid of the mutable variables, you can use Seq.mapFold instead:

let mapChange selector mapping seq = 
    seq
    |&gt; Seq.mapFold (fun (previous, change) item -&gt;
        let currentValue = selector item
        match differentOrNew previous currentValue with
        | true -&gt; 
            let newChange = mapping item
            (item, newChange), (Some currentValue, newChange)
        | false -&gt; 
            (item, change), (previous, change)
    ) (None, def)
    |&gt; (fst)