Latest #recursion Threads Top

MarthinL
Background: In response to the l unrelated question about TreeView in LiveView a lively yet off-topic debate about the pros and cons of u...
New
Kafftum
Would this code be tail call optimized? def loop do inner = fn func, idx, propulsor -> if idx === 1000 do ...
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
maximkuzmin
Hi! In my attempt to understand how Phoenix LiveView works, I’m trying to do a somewhat todo-list app, but with a simple twist - each to...
New
Djordjenp
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
oliverandrich
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
blackened
I am a complete Elixir beginner. I am trying to understand certain concepts with the following Mastermind sub-problem. Suppose I have tw...
New
egze
I have the following data structure: data = %{ "foo" => "bar", "abc" => %{ "source" => "my-id", "value" => "1234...
New
dsaghliani
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
sodapopcan
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

This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

Last Three Year's Trending Top

peck
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
MarthinL
Background: In response to the l unrelated question about TreeView in LiveView a lively yet off-topic debate about the pros and cons of u...
New
sodapopcan
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
Djordjenp
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
maximkuzmin
Hi! In my attempt to understand how Phoenix LiveView works, I’m trying to do a somewhat todo-list app, but with a simple twist - each to...
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
Kafftum
Would this code be tail call optimized? def loop do inner = fn func, idx, propulsor -> if idx === 1000 do ...
New

Trending Over Three Years Top

Onor.io
One question that came up for me when I first started with FP was how to do things that I was able to do in imperative without mutable va...
New
jgonet
What’s the state of recursive anonymous functions now? It was mentioned a while ago, when this feature was being introduced in OTP 17. Wh...
New
CommandoSev
How to write a recursive function, which iterates over a list and checks if an element is in that list in elixir?
New
eddy147
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
tovarchristian21
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
beatscode
Having an issue similar to https://elixirforum.com/t/whats-the-best-way-to-access-and-retrieve-data-from-deeply-nested-maps-and-lists/613...
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 h...
New
njwest
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
n4thyra
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
robinmonjo
Hello all, I wanted to implement a simple function that calculates the "hash rate" of my computer. Basically, how many times per second...
New
kensremit
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
English3000
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
egze
I have the following data structure: data = %{ "foo" => "bar", "abc" => %{ "source" => "my-id", "value" => "1234...
New
virzen
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
pichi
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
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement