in elixir, open a new shell:
variable = 5
lambda = &(&1 + variable)
File.write!("pickle", :erlang.term_to_binary(lambda))
close terminal, open new shell
unpickled = "pickle" |> File.read! |> :erlang.binary_to_term
unpickled.(5)
yields 10.
You could, of course, send that file over the network (via email, tcp/ip, carrier pigeon, whatever), and it's even easier if you use built-in erlang distribution primitives, which indeed do this under the hood.
Keep in mind that by default values are immutable, so when you're building that lambda it takes out a fixed-in-time reference to that 5 (or whatever, you could even make it user input). In other languages, if that variable changes... Something strange might happen, depending on what that underlying datatype is. In particular, side effects can exist for lists but not scalars in python.
In elixir, you can rebind that variable 5 to something else but it won't change the lambda (erlang doesn't allow you to do that at all, except in the repl, sort of). You could also do that with, say, a list datatype, and you get the same deal.
for example:
list = [1,2,3]
lambda = fn -> length(list) end
lambda.() #==> 3
list = list ++ [4, 5]
list #==> [1,2,3,4,5]
lambda.() #==> 3
which is what lets you have a lambda with no expectation on the mutability of the bound-in values. What you get is what you expect, no matter how far away or disconnected or even dead the source is. And that respect for the physics of causality and relativity, at the core, is what makes the BEAM languages so great for distributed systems.