# SICP Solutions

### Chapter 3, Modularity, Objects, and State

#### Exercise 3.22

This version of code looked simple as the operations like insert-queue, delete-queue need not to be passed with the queue parameter. It is just available to them!

For using it, I think it is individual choice whether one likes calling the operation by passing the object/context. Or by sending a message/operation to the object.

Note that I returned front-ptr(inside insert and delete operations) instead of dispatch, as it simplified printing. Perhaps it is better to return dispatch because it can help in combining multiple operations in a single statement.

Example/Output: