This Week's Trending
This Month's Trending
This Year's Trending
Last Three Year's Trending
I can’t seem to pass an anonymous function as an option to a Plug. I am using plug_hmouse which from the documentation takes an option di...
New
Hi,
I’m trying to create some syntactic sugar through a macro. The basic function should look like the following:
f :name do
data.som...
New
I am new to elixir and I am trying to make a recursive anonymous function, but for some reason my anynymous function that works on it’s o...
New
Hello,
I am testing below code
fibonaci = fn
0 -> 0
1 -> 1
n -> fibonaci.(n-1) + fibonaic.(n-2)
end
IO.puts fibonaci.(...
New
Hello, I am new to elixir and I am trying to call my anonymous function defined in my “ex” file like so:
package_data = fn
(x, [y]) -&...
New
Trending Over Three Years
(fn ->
{:ok, naive_date_time} =
NaiveDateTime.new(Date.utc_today(), (fn -> {:ok, time} = Time.new(3, 2, 00); time end)....
New
Completely new to Elixir, but have an issue I am trying to figure out:
When interviewing candidates for Javascript roles I usually have ...
New
Background
I have a filter to where I am passing an anonymous function. In this function I want to check that the key of the tuple I am e...
New
I’ve been struggling with this for a few hours now and there must be an easy answer despite my inability to search and find answers.
So ...
New
Capture operator & ampersand - can always I thing about it as fn x?
Hi Everybody,
Could you please help me understand how does capt...
New
So something like this fails to compile:
def streamfun_from_string(str) do
fn(skip_headers \\ true) ->
..
end
end
I am wonde...
New
Hey everyone!
This is a multi-layered question and I’ll try my best to try and phrase it cleanly.
As an abstract use case I want to hav...
New
In an anonymous function you can pattern match on same argument multiple times
color_of = fn
"fire" ->
IO.puts "red"
"water...
New
I was trying to write this Enum.reduce([1,2,3], &Kernel.+(&1, &2)) more succinctly and I discovered I could do Enum.reduce([1...
New
I am a beginner trying to make an anonymous function that takes two parameters. It needs to use guards to check if the two values are bot...
New
Hello,
I’m trying to create a new list from a map I’m given like so
Enum.map(params, fn {k,v} -> if String.contains?(k, "checklist")...
New
Hi, Im having a bit of trouble with anon. functions using the Vex validator.
defmodule Test do
@enforce_keys [:wallet_id, :withdrawal,...
New
Hi all,
for the identity function we have &(&1) as a shortcut, but &(true) does cause a compiler error. Understandably, sinc...
New
I’m current learning Elixir by the book Elixir in Action 2nd Edition. On chapter 3 at Stream functions exercises i’ve solved them a bit d...
New
I recently detected a bug (thanks, Dialyzer!) where I was calling an anonymous function with the wrong number of arguments. What confuses...
New
- Follow
- Join
- Shape
the conversation
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Sub Categories:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









