All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.scalameter.MonadicDynVar.scala Maven / Gradle / Ivy

package org.scalameter

import scala.util.DynamicVariable

class MonadicDynVar[T](v: T) extends DynamicVariable(v) {
  def using(nv: T) = new Foreach[Unit] {
    def foreach[U](f: Unit => U): Unit = withValue(nv)(f(()))
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy