Replies: 1 comment 4 replies
-
Interesting idea to make the transforms composable. Right now the transform solution is quite hard-coded. It basically takes the original function and creates a new "wrapper" function that invokes the original function. It would be interesting to investigate what would be needed to make the transforms composable. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not totally sure if this is a question or a feature request yet, but I'll start with it as a question. What is the cleanest way to combine multiple subsequent transforms together for a given node?
For example, let's say I have 2 transforms that I want to apply one after the other:
I know I can do this:
But that doesn't feel very elegant nor will it be scaleable with a lot of fns. Functional libraries often have some kind of compose function that work like this
But I can't seem to find this or any examples like this in mathjs. So, I guess that's my question: is there some kind of equivalent function I don't know about, or is there another way to do this?
If not, would you accept a PR to do either of the following?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions