Create collection of cartesian product of two (and more) lists with Java Lambda

前端 未结 0 1446
失恋的感觉
失恋的感觉 2021-01-15 07:25

I\'m able to easily achieve this in Scala with something like:

def permute(xs: List[Int], ys: List[Int]) = {
  for {x <- xs; y <- ys} yield (x,y)
}


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题