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

Public forum to share code snippets, screen shorts, experiences, etc.
Post Reply
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

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

Post 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 216 times
And with a slightly different coding we can make objects for our collection :-
ZipLinq_02.jpg
ZipLinq_02.jpg (22.06 KiB) Viewed 216 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.
Post Reply