jshmrsn
yourList.toMap({listElement -> listElement.valueToUseAsKey}, {listElement -> listElement.valueToUseAsValue})