How to use tf.data.Dataset.scan

Can anyone explain in much more detail how to effectively use the scan() method of a tensorflow dataset. The documentation explanation and usage does not seem very clear to me.