I have problem with my cs homework. I need to access the x value of the function, but my codes is returning me an empty function instead of with the values
x
You could change head function like this:
head
const pair = (x, y) => f => f(x, y); const head = f => f(a => a) console.log(head(pair(1,2)))