com.jnape.palatable.lambda.traversable

## Class LambdaMap<A,B>

- java.lang.Object
- - com.jnape.palatable.lambda.traversable.LambdaMap<A,B>

- Type Parameters:
    `A` - the `Map` element type
  All Implemented Interfaces:
    Functor<B,LambdaMap<A,?>>, Traversable<B,LambdaMap<A,?>>

      public final class LambdaMap<A,B>
      extends Object
      implements Functor<B,LambdaMap<A,?>>, Traversable<B,LambdaMap<A,?>>

  Extension point for `Map` to adapt lambda core types like `Functor` and `Traversable`.
  See Also:
    `LambdaIterable`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <A,B> LambdaMap<A,B>` | `empty()` Construct an empty `LambdaMap` by wrapping `Collections.emptyMap()`
    `boolean` | `equals(Object other)`
    `<C> LambdaMap<A,C>` | `fmap(Fn1<? super B,? extends C> fn)` Covariantly transmute this functor's parameter using the given mapping function.
    `int` | `hashCode()`
    `String` | `toString()`
    `<C,App extends Applicative<?,App>,TravC extends Traversable<C,LambdaMap<A,?>>,AppTrav extends Applicative<TravC,App>> AppTrav` | `traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravC,? extends AppTrav> pure)` Apply `fn` to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.
    `Map<A,B>` | `unwrap()` Unwrap the underlying `Map`.
    `static <A,B> LambdaMap<A,B>` | `wrap(Map<A,B> map)` Wrap a `Map` in a `LambdaMap`.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functor.Functor

      `coerce`

- - ### Method Detail

    - #### unwrap

          public Map<A,B> unwrap()

      Unwrap the underlying `Map`.
      Returns:
        the wrapped `Map`

    - #### fmap

          public <C> LambdaMap<A,C> fmap(Fn1<? super B,? extends C> fn)

      Description copied from interface: `Functor`
      Covariantly transmute this functor's parameter using the given mapping function. Generally this method is specialized to return an instance of the class implementing Functor.
      Specified by:
        `fmap` in interface `Functor<B,LambdaMap<A,?>>`
      Specified by:
        `fmap` in interface `Traversable<B,LambdaMap<A,?>>`
      Type Parameters:
        `C` - the new parameter type
      Parameters:
        `fn` - the mapping function
      Returns:
        a functor over B (the new parameter type)

    - #### traverse

          public <C,App extends Applicative<?,App>,TravC extends Traversable<C,LambdaMap<A,?>>,AppTrav extends Applicative<TravC,App>> AppTrav traverse(Fn1<? super B,? extends Applicative<C,App>> fn,
                                                                                                                                                        Fn1<? super TravC,? extends AppTrav> pure)

      Description copied from interface: `Traversable`
      Apply `fn` to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.
      Specified by:
        `traverse` in interface `Traversable<B,LambdaMap<A,?>>`
      Type Parameters:
        `C` - the resulting element type
        `App` - the result applicative type
        `TravC` - this Traversable instance over B
        `AppTrav` - the full inferred resulting type from the traversal
      Parameters:
        `fn` - the function to apply
        `pure` - the applicative pure function
      Returns:
        the traversed Traversable, wrapped inside an applicative

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### wrap

          public static <A,B> LambdaMap<A,B> wrap(Map<A,B> map)

      Wrap a `Map` in a `LambdaMap`.
      Type Parameters:
        `A` - the key type
        `B` - the value type
      Parameters:
        `map` - the `Map`
      Returns:
        the `Map` wrapped in a `LambdaMap`

    - #### empty

          public static <A,B> LambdaMap<A,B> empty()

      Construct an empty `LambdaMap` by wrapping `Collections.emptyMap()`
      Type Parameters:
        `A` - the key type
        `B` - the value type
      Returns:
        an empty `LambdaMap`