Earlier quoted context omitted.
> if a call at the beginning of the pipeline returns a tuple of `{:ok, result}` In my understanding, pipeline are mostly reserved for “unfailable” operations operating on raw data; whereas the where/else/do macro is more oriented towards errors handling; would it work better in your case?
I think you mean `with`, not `where`? Yes, it helps a bit in some cases, but it's not a replacement for a pipeline - mainly because you'd need to name your intermediate results and "thread" them through the calls yourself. I think I gave a bad example, the better one would be a function returning datetime in the format of :erlang.localtime: `{{Year,Month,Day},{Hour,Min,Sec}}`. I would like to be able to use this valu…
:erlang.localtime()
|> case do; {_, {h,m,_}} -> {h, m}; end
|> do_something
Not that I'd want to do that in production code, but I felt a bit nerd-sniped here, to see the shortest way I could find without dependencies.