pub trait MapLayer<B> {
type Unwrapped;
type To;
fn map_layer<F: FnMut(Self::Unwrapped) -> B>(self, f: F) -> Self::To;
}
Expand description
Provides the ability to map over some structure ‘Layer’,
such that ‘Self’ is ‘Layer
The function provided to map_layer MUST be strictly applied.
Required Associated Types
Required Methods
Additional constraint not present in haskell, req’d for stack machine eval: for any F, F, etc, where all structure but B/A is identical, fmap must visit nodes in the same order each time it is called given that F is created by mapping some function over F note that enforcing this property may be problematic for, Hashmaps/Sets/etc