假设我有一个类型:
type State[S, +A] = S => (A,S)
和一个功能:
def foo(): State[Obj, (x, y)]
如果我调用这个函数:
val result = foo() // result is an anonymous function: Obj => ((x, y), Obj)
如何访问Obj
和(x, y)
值?
假设我有一个类型:
type State[S, +A] = S => (A,S)
和一个功能:
def foo(): State[Obj, (x, y)]
如果我调用这个函数:
val result = foo() // result is an anonymous function: Obj => ((x, y), Obj)
如何访问Obj
和(x, y)
值?