You have two choices:
- The first and most performant is to use 
associateByfunction that takes two lambdas for generating the key and value, and inlines the creation of the map: 
val map = friends.associateBy({it.facebookId}, {it.points})
- The second, less performant, is to use the standard 
mapfunction to create a list ofPairwhich can be used bytoMapto generate the final map: 
val map = friends.map { it.facebookId to it.points }.toMap()