Not sure what exactly you are not getting, but explain the examples:
trait X[A] { def map[B](f: A => B): X[B] }
A trait is like a Java interface, which can also have specific methods.
X is the name of the attribute, and [A] is the type parameter - I think Java generics <A> . (Often A , B , etc. Used for item types in collections and T elsewhere, but this is just a convention.)
The characteristic indicates a member with the name map , which is a method with another parameter of type [B] and takes an argument of a function of type A => B , with a return type of X[B] . It is abstract here because there is no method body.
A bit that may be missing is that A => B not suitable for Function1[A, B] . Function1 - type of function objects that take 1 argument. (A, B) => C not suitable for Function2[A, B, C] , etc. You can create your own Function types in Java - this is a fun exercise. A functional object is essentially only one that has an apply method that creates a result from some arguments.
(1 to 10) map { x => x * 2 }
These include point notation, where a.method(b) written as a method b . So, to is a method on RichInt that takes a Int and creates a Range . map is a Range method that takes an argument to Function1 (remember that a function is just an object of type Function1 ).
=> also used to write the functions themselves (in addition to the level type, as described above). So, everything is the same: all objects of type Int => Int :
(x: Int) => x + 1 new Function1[Int, Int] { def apply(x: Int) = x + 1 }
Scala uses type inference, so you do not need to add all types yourself if a specific function type (or any other parameterized type) is expected from the context, for example
val f : Int => Int = x => x + 1 val f : Int => Int = _ + 1
I hope you see what this superscript notation means. The underline is useful, because otherwise there will always be some kind of repetition, since the RHS definition of the function must use the parameters from the LHS. Another example would be a function matching a String with its length:
val f: String => Int = _.length
Since vals types are usually inferred, you can provide only the necessary type annotation
val f = (_: String).length
This is probably a bit confusing because syntactic sugar and type inference mean that there are several ways to write the same thing, but once you get it, you will find it there to make your life easier and reduce noise. Play REPL with them if you haven't already.