How to read map function in scala

Code examples

0
0

map function scala

collection = (e1, e2, e3, ...)

//func is some function
collection.map(func)

//returns collection(func(e1), func(e2), func(e3), ...)
0
0

scala map example

val myMap = Map(
  ("key", 56),
  ("anotherKey", "value")
)

println(myMap("key")) // "56"

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................