1

以下は動作しません。どうすれば修正できますか?

Prelude Control.Lens> (2, 3, 4) ^. alongside _1 _2

<interactive>:19:14:
    Couldn't match type ‘(s0, s'0)’ with ‘(t0, t1, t2)’
    Expected type: Getting (a, a') (t0, t1, t2) (a, a')
      Actual type: LensLike
                     (Const (a, a')) (s0, s'0) (t3, t'0) (a, a') (a, a')
    In the second argument of ‘(^.)’, namely ‘alongside _1 _2’
    In the expression: (2, 3, 4) ^. alongside _1 _2

私が欲しかったのは(2, 3).

4

0 に答える 0