Gap distribution function

Hi Guys

Good day.
I like the new distribute feature in Rhino 6 (https://www.rhino3d.com/6/new/refinements#distribute) - 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).

Layout_GeometryBase_EntryLevel_V1.gh (123.3 KB)

Thanks Peter