learning scala zipAll

 

If two Iterables aren't the same size, then zipAll can provide fillers for what it couldn't find a complement for.

e.g. Iterable(x1, x2, x3) zipAll (Iterable(y1, y2), x, y) will return ((x1,y1), (x2, y2), (x3, y))):

 

 

posted @ 2019-08-14 14:43  嵌入式实操  阅读(518)  评论(0编辑  收藏  举报