an immutable version of result map