With an intelligent use of fromDouble etc. and overloaded APIs, we could reduce the amount of monadic syntax in user code. Such overloads could be placed in a separate module so that users can opt in to the possibility to accidentally write code that doesn't reuse values.
As a user, I want spidr to reuse values I reuse in code, so that the graph faithfully represents what I have written, and doesn't recalculate values.
We could do this via observable sharing, which is likely to require introducing monadic code to the main tensor API. See this post for more info
https://stackoverflow.com/q/74347734/5986907
With an intelligent use of
fromDouble
etc. and overloaded APIs, we could reduce the amount of monadic syntax in user code. Such overloads could be placed in a separate module so that users can opt in to the possibility to accidentally write code that doesn't reuse values.