Closed mmower closed 2 years ago
Hi, @mmower, you're generally going the right way, but you have a bug in your code:
Try
|> Enum.reduce(fn p1, p2 -> p2 ~> p1 end)
I was briefly baffled because my test cases had all used p1 ~> p2
and then it hit me that the accumulator goes second! Many thanks for the steer.
This happens to me every time when I switch to/from python (in python first argument is the accumulator and second is an item)
I want to create a dynamic path.
This is good, but what if I don't know [1, 1, 0] at compile time. I couldn't see anything documented about passing a list as a path, so I tried the following:
Any idea what I am missing here?
Thanks.
Matt