We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a value and a function with the same name (min).
I am not sure if it should run or give an error, but doing nothing seems incorrect.
Thanks for your work: Andras
The Code:
package programmingpraxis object ClosestTwoSumToZero { val input = List(45, -29, -96, -7, -17, 72, -60) val pairs = (for(i1 <- input; i2<-input.filter { x => x!=i1 }) yield (i1,i2)) val min = pairs.map(x=>(x._1+x._2).abs).min val minPair = pairs.filter(x=>x._1+x._2==min) val inputS = input.sorted def min(input: List[Int], min:Tuple2[Int,Int]):Tuple2[Int,Int]={ (1,1) } min(inputS,(-100,100)) }
Scala IDE version: 4.1.0.v-2_11-201505250839-aeb633d Scala compiler version: 2.11.6 Scala library version: 2.11.6 Eclipse version: 4.4.2.v20150204-1700 Class loader store: 2 entries Compiler v. 2.10.5(C:/DEVELOPING_1/tools/eclipseScala/plugins/org.scala-ide.scala210.jars_4.1.0.201505250838/target/jars/scala-compiler.jar) Compiler v. 2.11.6(C:/DEVELOPING_1/tools/eclipseScala/plugins/org.scala-lang.scala-compiler_2.11.6.v20150224-172222-092690e7bf.jar)
The text was updated successfully, but these errors were encountered:
Most likely a duplicate of #222
Sorry, something went wrong.
No branches or pull requests
I have a value and a function with the same name (min).
I am not sure if it should run or give an error, but doing nothing seems incorrect.
Thanks for your work:
Andras
The Code:
The text was updated successfully, but these errors were encountered: