Skip to content

Instantly share code, notes, and snippets.

View mvillafuertem's full-sized avatar
💭
😏

mvillafuertem

💭
😏
View GitHub Profile
package webm
import scala.collection.{GenMap, GenTraversableOnce}
import scala.language.experimental.macros
import scala.reflect.macros.blackbox
import scala.scalajs.js
import scala.scalajs.js.|
object FunctionMacro {
@dacr
dacr / gatling-simple.sc
Last active April 2, 2023 10:12
Just ONE ammonite script file to execute a load performance test using gatling ! / published by https://github.com/dacr/code-examples-manager #ea7a4259-9461-44a8-99fa-1ec6ec3c48ed/6bc5335f1571c83edc6278c55499c9c7ae43a5c0
// summary : Just ONE ammonite script file to execute a load performance test using gatling !
// keywords : scala, gatling, ammonite, scala, load-test, performance
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : ea7a4259-9461-44a8-99fa-1ec6ec3c48ed
// created-on : 2018-09-22T07:41:07Z
// managed-by : https://github.com/dacr/code-examples-manager
// execution : scala ammonite script (http://ammonite.io/) - run as follow 'amm scriptname.sc'
implicit class InfixMappable[A, B, C](f: A => B) {
def `<$>`[G[_]: Functor](ga: G[A]): G[B] = Functor[G].map(ga)(f)
}
val ap1: Option[Int] = ???
val ap2: Option[Int] = ???
val ap3: Option[Int] = ???
val f: Int => Int => Int => Int = ???
f `<$>` ap1 ap ap2 ap ap3