Issue #168: Preparations for list equality check.
Issue #168: Factor out core of equal() into its own non-stack-using function.
Issue #168: Implement/use the actual list comparison functionality.