Implement a method using a function value in Scala -
Is the implementation of the method possible by using the function object / value? I would like to write something in the spirit of this:
abstract class A {def f (x: int): int} extension of class B A {f = identity}
and supplement and, here's another:
abstract class A {def F: (Int) = & gt; Int} class B extends A {val f = identification}} is expanded in class C. {def f = identity}} is expanded in class D {def f = (x: int) => -x}
If you are connected to a normal DF, then you can do the best
abstract class z {def f (x: Int): int} square y extension z {def f (x: int) = detection (x)}
Comments
Post a Comment