It is in the core Tofu dependency - "ru.tinkoff" %% "tofu" % "0.7.0".
- A cache of a single value on access.
- A cache of a values mapping on access.
| Theorem andb_true_id : | |
| forall a : bool, a = andb true a. | |
| Proof. | |
| intros []; reflexivity. | |
| Qed. | |
| Theorem orb_false_id : | |
| forall a : bool, a = orb false a. | |
| Proof. | |
| intros []; reflexivity. |
| import cats.effect.concurrent.Ref | |
| import cats.effect.{IO, Sync} | |
| import cats._ | |
| import cats.implicits._ | |
| import fs2.Stream | |
| def g(r: => IO[Ref[IO, Int]]): Stream[IO, Int] = | |
| Stream | |
| .eval(r) | |
| .flatMap( |
| project.git = true | |
| maxColumn = 120 | |
| lineEndings = unix | |
| docstring = "ScalaDoc" | |
| assumeStandardLibraryStripMargin = true | |
| continuationIndent.callSite = 2 | |
| continuationIndent.defnSite = 4 | |
| style = defaultWithAlign |
| scala> object A1 { val a = 5 } | |
| defined object A1 | |
| scala> object A2 { final val a = 5 } | |
| defined object A2 | |
| scala> :javap A1$ | |
| Size 640 bytes | |
| MD5 checksum 0d6b181ccd3f32e7e81a7f452b2f5686 | |
| Compiled from "<console>" |
| class A{ | |
| val x: PartialFunction[Any, Int] = { | |
| case Some(x: Int) => x | |
| } | |
| } |
| import scala.io._ | |
| import java.io._ | |
| import scala.collection.mutable.ArrayBuffer | |
| object Main { | |
| def main(args: Array[String]): Unit = { | |
| var i = 0 | |
| var v1: ArrayBuffer[String] = new ArrayBuffer(10000) | |
| var v2: ArrayBuffer[String] = new ArrayBuffer(10000) | |
| Source.stdin.getLines.foreach{ |
| import pushka.json._ | |
| import pushka.annotation._ | |
| // First case. | |
| // Simple as is. | |
| @pushka | |
| case class A(subModel: B, i: Int, str: String) | |
| @pushka | |
| case class B(field1: Int, field2: List[Int]) |
| import org.scalameter._ | |
| import scala.concurrent.ExecutionContext.Implicits.global | |
| import scala.concurrent.duration.Duration | |
| import scala.concurrent.{Await, ExecutionContext, Future} | |
| object Main { | |
| /* |