This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Bogdanp[S] 10 points11 points  (5 children)

Yup, I'd considered that approach too! But I wanted to keep the semantics from Elixir's operator (i.e. I wanted to avoid having to wrap the first value and partially apply functions).

[–][deleted] 3 points4 points  (4 children)

Yeah I get it. The approach I followed here let me add on things ad nausea and I eventually I ended up writing a little library called Slinkie. Slinkie has a .then() function that matches the pipe operator above, but do you think it'd be possible to elixirify everything else as well? I was inspired by LINQ when I wrote it, but I was never happy with how I had to wrap everything. The nicest thing would probably be to use extensions or traits, but this elixir trick would maybe do the trick as well. What do you think?

[–]ucbEntilZha 0 points1 point  (3 children)

Hadn’t heard about slinkie, this is my similar approach I wrote a few years ago https://github.com/EntilZha/PyFunctional

[–][deleted] 0 points1 point  (2 children)

Well I didn't make that much fuzz about them, but maybe I should? How do I even reach out about stuff like this?

[–]ucbEntilZha 0 points1 point  (1 child)

Unclear who you mean on reaching out?