Gap distribution function

Hi Guys

Good day.
I like the new distribute feature in Rhino 6 ( - where we can distribute the gap along X-axis evenly.

Just wondering is there any grasshopper algorithm that can simulate the same behavior?

Thanks in advance.

See attached (input any valid GeometryBase List otherwise it does an internal demo. Same applies for the Layout origin point). (123.3 KB)

Thanks Peter