Created
June 5, 2018 01:33
-
-
Save ailabs-software/0fc4e939e0c9d31d46786053ebf061cb to your computer and use it in GitHub Desktop.
Casting iterable to iterable of map of maps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fails to work. Cast exception occurs as soon a value is accessed by key from one of the outer maps: | |
// e.g., iterable[0][outerKey] results in CastError | |
Map<Object, Map<Object, num> > reduceOpaqueIterable(Iterable<Object> windowValues) | |
{ | |
return windowValues.map( | |
(inner) => (inner as Map).cast<Object, Map<Object, num> >() ); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment