leftMap
leftMap is a function commonly found in functional programming libraries, particularly those dealing with data structures like `Either` or `Tuple`. Its primary purpose is to transform the "left" value of such a structure while leaving the "right" value unchanged. This is most often seen in the context of the `Either` type, which represents a value that can be one of two possible types, conventionally named `Left` and `Right`. The `Left` case typically signifies an error or failure, while the `Right` case represents a successful result.
When `leftMap` is applied to an `Either` value, it takes a function as an argument. If the
The signature of `leftMap` typically looks like this: `leftMap<B>(f: (a: A) => B): Either<B, R>`. Here, `A`