It would be nice to be able to just have a StackReductionMemoizer which knows how to act like a Deque like this:
ds StackReductionMemoizer[f] {
insertAtEnd! <- 1
reduce[f] <-1
QueueMemoizer {
insertAtFront <- 1
}
}
and when you use the more complicated inner structure, the interface clearly shows that it's being used.