Package cs2030s.fp

## Class Memo<T>

- java.lang.Object
- - cs2030s.fp.Lazy<T>
  - - cs2030s.fp.Memo<T>

All Implemented Interfaces:
  `Immutatorable<T>`

    public class Memo<T>
    extends Lazy<T>

### Field Summary

Fields
`private Actually<T>` `value`

### Constructor Summary

Constructors
`protected` `Memo​(Constant<? extends T> c)`
`protected` `Memo​(T v)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`<R,​S> Memo<R>` `combine​(Memo<? extends S> other, Combiner<? extends R,​? super T,​? super S> combiner)`
`static <T> Memo<T>` `from​(Constant<? extends T> v)`
`static <T> Memo<T>` `from​(T v)`
`T` `get()`
`<R> Memo<R>` `next​(Immutator<? extends Lazy<? extends R>,​? super T> f)`
`java.lang.String` `toString()`
`<R> Memo<R>` `transform​(Immutator<? extends R,​? super T> f)` The method to produce another container with immutated element.

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

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

### Field Detail

#### value

    private Actually<T> value

### Constructor Detail

#### Memo

    protected Memo​(Constant<? extends T> c)

#### Memo

    protected Memo​(T v)

### Method Detail

#### from

    public static <T> Memo<T> from​(T v)

#### from

    public static <T> Memo<T> from​(Constant<? extends T> v)

#### get

    public T get()

Overrides:
  `get` in class `Lazy<T>`

#### combine

    public <R,​S> Memo<R> combine​(Memo<? extends S> other,
                                       Combiner<? extends R,​? super T,​? super S> combiner)

#### transform

    public <R> Memo<R> transform​(Immutator<? extends R,​? super T> f)

Description copied from interface: `Immutatorable`
The method to produce another container with immutated element.

Specified by:
  `transform` in interface `Immutatorable<T>`
Overrides:
  `transform` in class `Lazy<T>`
Type Parameters:
  `R` - the return type
Parameters:
  `f` - The immutator.
Returns:
  A new container containing the immutated element.

#### next

    public <R> Memo<R> next​(Immutator<? extends Lazy<? extends R>,​? super T> f)

Overrides:
  `next` in class `Lazy<T>`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `Lazy<T>`