I've been working with fp-ts and encountered a situation where I have a curried function consisting of two functions, like this:
const newFunction = (name: string) => (greeting: string) => console.log('Hello ' + name + ' ' + greeting);
While this example is simple, there are cases where it would be beneficial for me to reverse the order of the functions, resulting in something like this:
const newFunction = (greeting: string) => (name: string) => console.log('Hello ' + name + ' ' + greeting);
Is there a way within fp-ts to achieve this desired outcome? I came across this article that explains the ap
function, but when I tried implementing it in my code, it didn't work as expected.