I am looking at handling functions that return promises with Ramda functions other then pipeP. I am trying to compare functions (one of which returns a promise) with equals like this:
getSectionFromDb :: obj -> promise
getSectionFromData :: obj -> number
R.equals(
getSectionFromDb,
getSectionFromData
)
There are two factors at play here. First R.equals will not evaluate functions, but the bigger issue is that I'm comparing a promise to a number.
Is there a functional way of doing this kind of stuff (I know the functions are not referential transparent, but there must be a way of dealing with io)? Is there a Ramda way of doing this?
Thanks.