where is scala get() method been defined -
def twosum(param1: list[int], param2: int) = { val gb = ((param1 combinations 2 tolist) find (_.sum == param2) get) val gb2 = gb map (param1.indexof(_)) sorted val index1 = gb2(0)+1 val index2 = gb2(1)+1 println(s" index1 = ${index1}, index2 = ${index2}") }
in code, it's using @ second line. question scala get() method been defined.
thanks
Comments
Post a Comment