do you know about "fp-ts"?
Yes, I am familiar with the "fp-ts" library. It is a library for TypeScript and JavaScript that provides various tools for working with functional programming in these languages. Some of the features of fp-ts include a wide range of type-safe data structures, support for common functional patterns, and utilities for working with type classes and other functional concepts.
Why do monads in "fp-ts" include a "tag" property?
In the context of the fp-ts library, the "tag" property of a monad is a way of identifying the specific type of the monad. This can be useful for type checking and for ensuring that the correct methods are being called on the monad. For example, the Option monad in fp-ts has a tag value of Some or None, which indicates whether the Option has a value or not. This allows the fp-ts library to provide type-safe methods for working with Option values, such as map, chain, and getOrElse.
why can't they use the "in" operator to narrow the types instead of a tag?