#pipe placeholders?
1 messages · Page 1 of 1 (latest)
I think there maybe be some misconception here about the placeholder syntax, it can be any parameter
And you can definitely combine pipes and labels to pipe to whichever param you want to
cool, see what a noob I am!
you could, for instance, set a placeholder to whichever positional argument
you can do that already! with or without labels
in gleam the placeholder is _
thanks!
yup, can see that now. it's just I came across the problem from that angle. missed it at first.
Tagging on here, I had trouble figuring out how to reference the "invisible" piped value if I had to reference it more than once which seemed to prevent usage of _. For example:
MyType(a=1, b=2, c=3)
|> some_func
|> some_other_func("example", _)
|> problem_func(_.a, "other arg", _.c) // how is this done?