of<B> function

Identity<B> of<B>(
  1. B value
)

Wraps the provided value into an Identity.

This acts as a constructor for the Identity monad, allowing you to wrap values without calling the class constructor directly.

Example:

final intValue = of(5);
final stringValue = of("Hello");

Implementation

Identity<B> of<B>(B value) => Identity<B>(value);