xsharp.eu • from squash-flatten, to sideways-join-zip !
Page 1 of 1

from squash-flatten, to sideways-join-zip !

Posted: Fri Mar 03, 2017 4:12 pm
by Phil Hepburn
Hi guys,

After our look yesterday at destroying a data structure (flattening), here today is a way of building up a data structure - in a way that may be novel (and different) to many of us, me included.

Part of the LINQ extension methods 'list' is Zip - stuck right at the very end of the methods list.
Check this out :-
ZipLinq_01.jpg
ZipLinq_01.jpg (59.01 KiB) Viewed 225 times
And with a slightly different coding we can make objects for our collection :-
ZipLinq_02.jpg
ZipLinq_02.jpg (22.06 KiB) Viewed 225 times
As yet I have just explored the X# syntax, and not gotten around to seeing how useful this may be. Presumably, if it wasn't useful they (Microsoft guys) would not have made such an extension method.

See what you think - any good ideas and comments, please post here as relies.

Thanks and Best regards,
Phil.
Wales, UK.