3 ms·
> Elixir and F# have |> but neither auto-traces. Using dbg/2 [1]: # In dbg_pipes.exs __ENV__.file |> String.split("/", trim: true) |> List.last() |>
by nivertech 8mo ago
> Elixir and F# have |> but neither auto-traces.
Using dbg/2 [1]:
# In dbg_pipes.exs
__ENV__.file
|> String.split("/", trim: true)
|> List.last()
|> File.exists?()
|> dbg()
This code prints:
[dbg_pipes.exs:5: (file)]
__ENV__.file #=> "/home/myuser/dbg_pipes.exs"
|> String.split("/", trim: true) #=> ["home", "myuser", "dbg_pipes.exs"]
|> List.last() #=> "dbg_pipes.exs"
|> File.exists?() #=> true
---
1. Debugging - dbg/2
https://hexdocs.pm/elixir/debugging.html#dbg-2 https://hexdocs.pm/elixir/debugging.html#dbg-2
- anonzzzies 8mo agoI should have bet more on Elixir. I did work in F# but MS really didn't seem serious enough about it, but the Elixer community keeps going strong.