Latest #recursion Threads 
Would this code be tail call optimized?
def loop do
inner = fn func, idx, propulsor ->
if idx === 1000 do
...
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
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
I am currently building a small library that has to traverse a tree of nodes and transform this tree into a document. This tree traversal...
New
I have the following data structure:
data = %{
"foo" => "bar",
"abc" => %{
"source" => "my-id",
"value" => "1234...
New
I’d like to write a function that receives all messages in the inbox and returns them as a list. It should be a dead-simple task, but I c...
New
I thought I would make one of these “improve this code” posts even though this problem isn’t really at that interesting (but here we are)...
New
The 100th episode of Thinking Elixir is spent with José Valim celebrating 10 years of Elixir. We close out our 5-part series talking abou...
New
Hi,
I’m a beginner, and I’m trying to solve a rather simple question but I’m kinda stuck. I’m trying to write a fully-recursive function...
New
There are similar questions such as Build a Tree of Structs but I haven’t found any that would deal with exactly the same issue that I ne...
New
This Week's Trending
This Month's Trending
This Year's Trending
Last Three Year's Trending
Hi everyone. I’m trying to wrap my head around using the CTE functionality in Ecto and I haven’t quite been able to figure it out by look...
New
I thought I would make one of these “improve this code” posts even though this problem isn’t really at that interesting (but here we are)...
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
Would this code be tail call optimized?
def loop do
inner = fn func, idx, propulsor ->
if idx === 1000 do
...
New
Trending Over Three Years
How to write a recursive function, which iterates over a list and checks if an element is in that list in elixir?
New
I have a nested map as such:
%{product: %{category: "45", code: nil}, date: "2021-04-01"}
I am trying to remove all items that do have ...
New
Having an issue similar to https://forum.elixirforum.net/t/whats-the-best-way-to-access-and-retrieve-data-from-deeply-nested-maps-and-lis...
New
Hello guys, I’ve been wondering lately how do I actually know my recursive functions are in fact optimized and every recursive call is no...
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 h...
New
Still fairly new to Elixir and am coming from OOP, so bear with me here...
I have a list of lists of strings, each with a length of 2,...
New
There are similar questions such as Build a Tree of Structs but I haven’t found any that would deal with exactly the same issue that I ne...
New
Hello all,
I wanted to implement a simple function that calculates the "hash rate" of my computer. Basically, how many times per second...
New
For context, check out this blog post.
To summarize, I tried building a BST using tail-recursion only to realize that when children are ...
New
I know elixir is a functional programming language and this means can’t make a change state in some problems? Do I am missing something? ...
New
I have the following data structure:
data = %{
"foo" => "bar",
"abc" => %{
"source" => "my-id",
"value" => "1234...
New
Hi, I’m new here. I’m finally trying out Elixir after hearing and reading about it for quite some time.
I’m implementing simple algorith...
New
How can I define the recursive anonymous function in Elixir? In Erlang, I can write:
1> F = fun X([]) -> []; X([H|T]) -> [H+1|X...
New
I’d like to write a function that receives all messages in the inbox and returns them as a list. It should be a dead-simple task, but I c...
New
Hi,
I’m a beginner, and I’m trying to solve a rather simple question but I’m kinda stuck. I’m trying to write a fully-recursive function...
New
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:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #ash-questions
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #discussion
- #javascript
- #elixirconf
- #library
- #oban-questions
- #dialyzer
- #docker
- #onsite
- #authentication
- #podcasts
- #full-time-contract
- #umbrella
- #code-sync
- #ecto-query
- #phoenix_html
- #iex
- #graphql
- #genstage
- #elixir-ls
- #nerves-questions
- #podcasts-by-brainlid
- #supervisor
- #websockets
- #distillery
- #advent-of-code
- #blog-post
- #livebook-questions
- #processes
- #forms
- #api
- #metaprogramming







