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

前端 未结 0 805
深忆病人
深忆病人 2021-01-15 07:39

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)
}


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