LoginSignup
1
0

More than 3 years have passed since last update.

Scalaのfor-comprehensionの途中”=”でTupleが分解できるって常識なの?

Posted at

知らんかった

何気なくZIOのドキュメント見てたら

def bigCompute(m1: Matrix, m2: Matrix, v: Matrix): UIO[Matrix] =
  for {
    t <- computeInverse(m1).zipPar(computeInverse(m2))
    (i1, i2) = t
    r <- applyMatrices(i1, i2, v)
  } yield r

ってfor-comprehension内で"="使ってTuple分解してた。

知らんかった。

今まで見たことなかったけど、これって常識なの?

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0