News

Generate anonymous function feature

In Scala, you can use anonymous functions. Now you can generate them automatically in case if it’s method call argument.

Lets, for example you have the following code:

Then use smart completion (Ctrl + Shift + Space) to see an appropriate variant:

After the completion you will get:

This feature works like Live Template, so you will be able to replace variable names and abstract types (in the next example Int is chosen automatically for ‘foldLeft’ type parameter, but you can replace it, if you want).

Also you can use brace syntax for method call (then partial anonymous function will be generated):

After completion you will get: