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

teststate.core.package.scala Maven / Gradle / Ivy

The newest version!
package teststate

import teststate.data.{BeforeAfter, NameFn}

package object core {

  @inline implicit class TestStateCoreAnyExt[A](private val self: A) extends AnyVal {
    @inline def |>[B](f: A => B): B =
      f(self)
  }

  @inline implicit class TestStateNFEBA[A](private val f: NameFn[BeforeAfter[A]] => NameFn[BeforeAfter[A]]) extends AnyVal {
    def thruBefore: NameFn[A] => NameFn[A] =
      n => f(n.cmap(_.before)).cmap(BeforeAfter.same)

    def thruAfter: NameFn[A] => NameFn[A] =
      n => f(n.cmap(_.before)).cmap(BeforeAfter.same)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy