* ⇒, →, ← * because we don't want to show them in documentation snippets and then it's complicated to avoid that when snippets are located in src/test/scala in individual modules * dont replace object `→` in FSM.scala and PersistentFSM.scala
19 lines
344 B
Scala
19 lines
344 B
Scala
/*
|
|
* Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com>
|
|
*/
|
|
|
|
package docs.stream.operators
|
|
|
|
//#imports
|
|
import akka.NotUsed
|
|
import akka.stream.scaladsl._
|
|
|
|
//#imports
|
|
|
|
object Map {
|
|
|
|
//#map
|
|
val source: Source[Int, NotUsed] = Source(1 to 10)
|
|
val mapped: Source[String, NotUsed] = source.map(elem => elem.toString)
|
|
//#map
|
|
}
|