This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |