This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

Last Three Year's Trending Top

notexactlyawe
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
a-maze-d
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
rajagennu
Hello, I am testing below code fibonaci = fn 0 -> 0 1 -> 1 n -> fibonaci.(n-1) + fibonaic.(n-2) end IO.puts fibonaci.(...
New

Trending Over Three Years Top

dokuzbir
(fn -> {:ok, naive_date_time} = NaiveDateTime.new(Date.utc_today(), (fn -> {:ok, time} = Time.new(3, 2, 00); time end)....
New
Travis
Completely new to Elixir, but have an issue I am trying to figure out: When interviewing candidates for Javascript roles I usually have ...
New
Fl4m3Ph03n1x
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
tme_317
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
benhoven
Capture operator & ampersand - can always I thing about it as fn x? Hi Everybody, Could you please help me understand how does capt...
New
ashneyderman
So something like this fails to compile: def streamfun_from_string(str) do fn(skip_headers \\ true) -> .. end end I am wonde...
New
PragTob
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
WestKeys
In an anonymous function you can pattern match on same argument multiple times color_of = fn "fire" -> IO.puts "red" "water...
New
purplesquirrel
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
kouluelixir
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
chemist
Hi, Im having a bit of trouble with anon. functions using the Vex validator. defmodule Test do @enforce_keys [:wallet_id, :withdrawal,...
New
sf8193
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
arnomi
Hi all, for the identity function we have &(&1) as a shortcut, but &(true) does cause a compiler error. Understandably, sinc...
New
oliveiragahenrique
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
Rich_Morin
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

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement