In Scala it's called blocks [0], and if a function/method expects one you can provide it inline, eg:
myList.foreach { x => doTheThingToTheThingEvery(x, 100 millis) }
Of course it's sometimes a bit too much. It starts out cute [1] and handy [2][3][4], then [5] ... [6] :)[0] https://docs.scala-lang.org/tour/basics.html#blocks
[1] https://scastie.scala-lang.org/tpfgE80WTc6QQaHslraJag
[2] https://www.playframework.com/documentation/2.8.x/ScalaActio...
[3] https://stackoverflow.com/q/50370202/44166
[5] https://www.playframework.com/documentation/2.8.x/ScalaActio...
[6] https://miro.medium.com/max/784/1*EMiSTuRIxUPCzWOgLkiXoA.jpe...