Is it possible to write a parameterized function using and designation?
Here is an example of a parameterized function from Dave Thomas's book "Elixir of Programming"
title = fn (title) -> ( fn (name) -> title <> " " <> name end ) end mrs = title.("Mrs.") IO.puts mrs.("Rose")
The output of the program above:
Mrs. Rose [Finished in 0.6s]
Can title be written using and notation? An example and notation are given below.
iex> square = &(&1 * &1) #Function<6.17052888 in :erl_eval.expr/5> iex> square.(8) 64
source share