# value2Succes possible conversion functions from Int to ?{def flatMap?}

**URL:** <https://community.gatling.io/t/value2succes-possible-conversion-functions-from-int-to-def-flatmap/4723>\
**Category:** Gatling (Open-Source)\
**Created:** [December 20, 2018, 8:51pm UTC](https://community.gatling.io/t/value2succes-possible-conversion-functions-from-int-to-def-flatmap/4723 "2018-12-20T20:51:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [December 20, 2018, 8:51pm UTC](https://community.gatling.io/t/value2succes-possible-conversion-functions-from-int-to-def-flatmap/4723/1 "2018-12-20T20:51:56Z")

</div>

Hi,

This has nothing to do with Gatling or Scala version.

You’re trying to use Scala’s for comprehension so you should probably try to read some tutorials first, eg [https://docs.scala-lang.org/tour/for-comprehensions.html](https://docs.scala-lang.org/tour/for-comprehensions.html).  
For comprehensions iterate over containers of the same type with the “\<-” operator.

You have to switch the 2 lines in your for comprehension block and use an “=” instead of a `<-` for the (new) second line as you don’t want to iterate over an Int.
