IdOps

final
class IdOps[A](val self: A) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

final
def ??(d: => A)(implicit ev: Null <:< A): A

Returns self if it is non-null, otherwise returns d.

Returns self if it is non-null, otherwise returns d.

@inline
def ?|>(p: A => Boolean, f: A => A): A

Applies self to the provided function if the predicate is satisfied, otherwise return self.

Applies self to the provided function if the predicate is satisfied, otherwise return self.

@inline
def applyIf(p: A => Boolean)(f: A => A): A

Applies self to the provided function if the predicate is satisfied, otherwise return self.

Applies self to the provided function if the predicate is satisfied, otherwise return self.

final
def doWhile(f: A => A, p: A => Boolean): A

Repeatedly apply f, seeded with self, checking after each iteration whether the predicate p holds.

Repeatedly apply f, seeded with self, checking after each iteration whether the predicate p holds.

@inline
final
def into[B](f: A => B): B

Alternative syntax for the Thrush combinator or a total match.

Alternative syntax for the Thrush combinator or a total match.

def matchOrZero[B : Monoid](pf: PartialFunction[A, B]): B
Returns

the result of pf(value) if defined, otherwise the Zero element of type B.

final
def squared: (A, A)
def visit[F[_] : Applicative](p: PartialFunction[A, F[A]]): F[A]

If the provided partial function is defined for self run this, otherwise lift self into F with the provided scalaz.Applicative.

If the provided partial function is defined for self run this, otherwise lift self into F with the provided scalaz.Applicative.

final
def whileDo(f: A => A, p: A => Boolean): A

Repeatedly apply f, seeded with self, checking before each iteration whether the predicate p holds.

Repeatedly apply f, seeded with self, checking before each iteration whether the predicate p holds.

final
def |>[B](f: A => B): B

Applies self to the provided function. The Thrush combinator.

Applies self to the provided function. The Thrush combinator.

final
def [B](f: A => B): B

Applies self to the provided function. The Thrush combinator.

Applies self to the provided function. The Thrush combinator.

Deprecated methods

@deprecated("will be removed in 7.3", "7.2")
final
def <|(f: A => Any): A

Alias for unsafeTap.

Alias for unsafeTap.

Deprecated
@deprecated("will be removed in 7.3", "7.2")
final
def unsafeTap(f: A => Any): A

Applies self to the provide function for its side effect, and returns self. The Kestrel combinator. Mostly for use with dodgy libraries that give you values that need additional initialization or mutation before they're valid to use.

Applies self to the provide function for its side effect, and returns self. The Kestrel combinator. Mostly for use with dodgy libraries that give you values that need additional initialization or mutation before they're valid to use.

The name tap comes from the Ruby method: http://ruby-doc.org/core-2.0.0/Object.html#method-i-tap which allows you to "tap into" a method call chain, in order to perform operations on intermediate results within the chain. unsafe because it enables side effects.

Deprecated
@deprecated("will be removed in 7.3", "7.2")
final
def (f: A => Any): A

Alias for unsafeTap.

Alias for unsafeTap.

Deprecated

Concrete fields

val self: A