Class/Object

japgolly.scalajs.react

CallbackKleisli

Related Docs: object CallbackKleisli | package react

Permalink

final case class CallbackKleisli[A, B](run: (A) ⇒ CallbackTo[B]) extends AnyVal with Product with Serializable

A => CallbackTo[B] aka Kleisli[CallbackTo, A, B] aka ReaderT[A, CallbackTo, B].

Never heard of Kleisli? Basically, a "Kleisli triple" is a function with the shape A => M[B]. In this case, the M is hard-coded to CallbackTo.

This is hard-coded to CallbackTo for the same reasons as CallbackOption and for the same reasons that CallbackTo exists.

Since

1.2.0

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CallbackKleisli
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyVal
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CallbackKleisli(run: (A) ⇒ CallbackTo[B])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. def *>[C](next: CallbackKleisli[A, C]): CallbackKleisli[A, C]

    Permalink

    Alias for >>.

    Alias for >>.

    Where >> is often associated with Monads, *> is often associated with Applicatives.

    Annotations
    @inline()
  4. def <*[C](next: CallbackKleisli[A, C]): CallbackKleisli[A, B]

    Permalink

    Sequence actions, discarding the value of the second argument.

  5. def <<[C](prev: CallbackKleisli[A, C]): CallbackKleisli[A, B]

    Permalink

    Sequence a CallbackKleisli to run before this, discarding any value produced by it.

    Sequence a CallbackKleisli to run before this, discarding any value produced by it.

    Annotations
    @inline()
  6. def <<?[C](prev: Option[CallbackKleisli[A, C]]): CallbackKleisli[A, B]

    Permalink

    Convenient version of << that accepts an Option

  7. def <=<[C](prev: CallbackKleisli[C, A]): CallbackKleisli[C, B]

    Permalink
    Annotations
    @inline()
  8. def <|(t: (B) ⇒ Any): CallbackKleisli[A, B]

    Permalink

    Alias for tap.

    Alias for tap.

    Annotations
    @inline()
  9. def =<<(a: CallbackTo[A]): CallbackTo[B]

    Permalink
  10. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  11. def >=>[C](next: CallbackKleisli[B, C]): CallbackKleisli[A, C]

    Permalink
  12. def >>[C](next: CallbackKleisli[A, C]): CallbackKleisli[A, C]

    Permalink

    Sequence a CallbackKleisli to run after this, discarding any value produced by this.

  13. def >>=[C](f: (B) ⇒ CallbackKleisli[A, C]): CallbackKleisli[A, C]

    Permalink

    Alias for flatMap.

    Alias for flatMap.

    Annotations
    @inline()
  14. def andThen[C](next: CallbackKleisli[B, C]): CallbackKleisli[A, C]

    Permalink
    Annotations
    @inline()
  15. def apply(a: A): CallbackTo[B]

    Permalink
    Annotations
    @inline()
  16. def asCallback: CallbackTo[(A) ⇒ B]

    Permalink
  17. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  18. def attempt: CallbackKleisli[A, Either[Throwable, B]]

    Permalink

    Wraps this callback in a try-catch and returns either the result or the exception if one occurs.

  19. def attemptTry: CallbackKleisli[A, Try[B]]

    Permalink

    Wraps this callback in a scala Try with catches what it considers non-fatal errors.

    Wraps this callback in a scala Try with catches what it considers non-fatal errors.

    Use attempt to catch everything.

  20. def compose[C](prev: CallbackKleisli[C, A]): CallbackKleisli[C, B]

    Permalink
    Annotations
    @inline()
  21. def contramap[C](f: (C) ⇒ A): CallbackKleisli[C, B]

    Permalink
  22. def contramapCB[C](f: (C) ⇒ CallbackTo[A]): CallbackKleisli[C, B]

    Permalink
  23. def dimap[C, D](f: (C) ⇒ A, g: (B) ⇒ D): CallbackKleisli[C, D]

    Permalink
    Annotations
    @inline()
  24. def flatMap[C](f: (B) ⇒ CallbackKleisli[A, C]): CallbackKleisli[A, C]

    Permalink
  25. def flatTap[C](t: (B) ⇒ CallbackKleisli[A, C]): CallbackKleisli[A, B]

    Permalink
  26. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def map[C](f: (B) ⇒ C): CallbackKleisli[A, C]

    Permalink
  29. def mapCB[C](f: (CallbackTo[B]) ⇒ CallbackTo[C]): CallbackKleisli[A, C]

    Permalink
  30. def narrow[C <: A]: CallbackKleisli[C, B]

    Permalink
  31. def ret[C](c: C): CallbackKleisli[A, C]

    Permalink

    Discard the callback's return value, return a given value instead.

    Discard the callback's return value, return a given value instead.

    ret, short for return.

  32. val run: (A) ⇒ CallbackTo[B]

    Permalink
  33. def strongL[R]: CallbackKleisli[(A, R), (B, R)]

    Permalink
  34. def strongR[L]: CallbackKleisli[(L, A), (L, B)]

    Permalink
  35. def tap(t: (B) ⇒ Any): CallbackKleisli[A, B]

    Permalink

    When the callback result becomes available, perform a given side-effect with it.

  36. def toCallback(a: CallbackTo[A]): CallbackTo[B]

    Permalink
  37. def toJsFn: Function1[A, B]

    Permalink
  38. def unless(test: (A) ⇒ Boolean): CallbackKleisli[A, Option[B]]

    Permalink
    Annotations
    @inline()
  39. def unless_(test: (A) ⇒ Boolean): CallbackKleisli[A, Unit]

    Permalink
    Annotations
    @inline()
  40. def void: CallbackKleisli[A, Unit]

    Permalink

    Discard the value produced by this callback.

  41. def voidExplicit[C](implicit ev: <:<[B, C]): CallbackKleisli[A, Unit]

    Permalink

    Discard the value produced by this callback.

    Discard the value produced by this callback.

    This method allows you to be explicit about the type you're discarding (which may change in future).

    Annotations
    @inline()
  42. def when(test: (A) ⇒ Boolean): CallbackKleisli[A, Option[B]]

    Permalink
  43. def when_(test: (A) ⇒ Boolean): CallbackKleisli[A, Unit]

    Permalink
  44. def widen[C >: B]: CallbackKleisli[A, C]

    Permalink
  45. def zip[C](cb: CallbackKleisli[A, C]): CallbackKleisli[A, (B, C)]

    Permalink
  46. def |>[C](f: (B) ⇒ C): CallbackKleisli[A, C]

    Permalink

    Alias for map.

    Alias for map.

    Annotations
    @inline()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyVal

Inherited from Any

Ungrouped