title: Is there a way I can write this Haskell code in Scala?
body: <p>I'm going through a few functional programming languages, learning things of interest, and I'm looking at Scala now. What I'm trying to do is figure out the simplest way to write a function called <code>double</code> which take one argument and doubles it. What I've come up with so far is:</p>
  
  <pre><code>def double = (x:Int) =&gt; x*2
  </code></pre>
  
  <p>or</p>
  
  <pre><code>def double(x:Int) = x*2
  </code></pre>
  
  <p>This works, but I'm looking for the <em>simplest</em> way. In Haskell, I could simply do this:</p>
  
  <pre><code>double = (*2)
  </code></pre>
  
  <p>Because it's a partially applied function, there's no need to name the variable or specify any types (I'm sure the <code>*</code> function takes care of that). Is there a similar way to do this using Scala? I've tried a few, especially using <code>_</code> instead of <code>x</code>, but none seemed to work.</p>