`tap` is one of my favorite functions. I implemented it myself in my functools, but then a colleague of mine told me that it's already in .

Documentation: hexdocs.pm/elixir/1.12.3/Kerne

Code: github.com/elixir-lang/elixir/

@jonn nice, I honestly never knew that was in the kernel.

Follow

@entropealabs yeah, it's super-useful if you want to sprinkle a side-effect into a pipe.

Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.