As part of my question (F# Threading Changing State Through Unfold) I stumbled upon a solution using the Seq.fold
function, but the syntax looked strange to me.
Essentially:
items
|> Seq.fold (fun (someState) theItem -> ....) someInitialState
I get what it's doing functionally, but I'm not entirely sure how it's doing it...
Is specifying SomeState
separately in parentheses creating a curried function that someInitialState
is then being partially applied to?
I don't think this is something specific to the fold function, and is likely just utilising a functional principle that I'm not seeing.