The type of value contained in the functor
The type tag for pattern matching (e.g., "Some" | "None" for Option)
Counts elements that satisfy the predicate. For single-value containers: returns 0 or 1 For collections: returns the count of matching elements
Tests whether any element satisfies the predicate. For single-value containers: tests the single value For collections: returns true if any element matches
Applies an effect function to each element. For single-value containers: applies to the value if present For collections: applies to each element
Custom JSON serialization. Returns the canonical @functype-marked
envelope object so native JSON.stringify (and the rest of the JSON
toJSON protocol) emits a round-trip-able shape that
Serialization.deserialize can reconstruct.
Added in 1.2.0. Concrete types narrow the return to their specific marker/tag literals.
Base interface for all functype data structures. This provides a standard contract with core functional programming traits.
Example