You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConstantFunction is a ContinuousMap that only ever returns one fixed value. It's innately indifferent to its TIn type.
Write a generic implicit cast to convert any ConstantFunction<TIn, TOut> to ConstantFunction<TIn2, TOut> for arbitrary TIn and TIn2 types, since the ConstantFunction doesn't use its input. The same function should be declared for a cast to ContinuousMap<TIn2, TOut>, since I'm not sure whether an upcast will implicitly combine with a user-defined conversion operator.
The text was updated successfully, but these errors were encountered:
ConstantFunction is a ContinuousMap that only ever returns one fixed value. It's innately indifferent to its TIn type.
Write a generic implicit cast to convert any
ConstantFunction<TIn, TOut>
toConstantFunction<TIn2, TOut>
for arbitraryTIn
andTIn2
types, since the ConstantFunction doesn't use its input. The same function should be declared for a cast toContinuousMap<TIn2, TOut>
, since I'm not sure whether an upcast will implicitly combine with a user-defined conversion operator.The text was updated successfully, but these errors were encountered: