Skip to content
New issue

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

Worksheet - Error blinks - does not run #224

Closed
githubeyaneu opened this issue Jun 26, 2015 · 1 comment
Closed

Worksheet - Error blinks - does not run #224

githubeyaneu opened this issue Jun 26, 2015 · 1 comment

Comments

@githubeyaneu
Copy link

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)
@dragos
Copy link
Member

dragos commented Jun 27, 2015

Most likely a duplicate of #222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants