Quantcast
Channel: some operator questions - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Luigi Plinge for some operator questions

In the methoddef tweener(method: () => Unit) { method()}the method is called tweener, the parameter is arbitrarily named method, and the type of method is () => Unit, which is a function type, as...

View Article



Answer by om-nom-nom for some operator questions

'<-' could be threated as 'in' so for(number <- numbers){...}could be translated into english as for each number in numbers do'<-' has a twin with a different semantics: '->'. Simply it is...

View Article

Answer by David for some operator questions

() => Unit means that method is a function that takes no parameter and returns nothing (Unit).<- is used in the for comprehension as an kind of assignation operator. for comprehension are a...

View Article

some operator questions

I'm new to scala so sorry if this is easy but I've had a hard time finding the answer.I'm having a hard time understanding what <- does, and what ()=> Unit does. My understanding of these is that...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images