const peek = (stack: T[], offset = 1): T => stack[stack.length - offset]; export default peek;