<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="379450" data-post-id="379450">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Kevo" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Kevo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I don’t use elixir much, mainly just learning for some hobby projects I have in mind, but I like doing these puzzles as I learn about functions I don’t use or know much and it’s just a different way of thinking stringing things together in pipelines. I kind of enjoyed the parsing challenge in the second part. Zip and chunk_by are ones I rarely use that helped me out today.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Puzzle do
  def parse_first(input) do
    input
    |&gt; String.split("\n", trim: true)
    |&gt; Enum.map(&amp;String.split(&amp;1, " ", trim: true))
    |&gt; Enum.zip()
    |&gt; Enum.map(&amp;Tuple.to_list/1)
    |&gt; Enum.map(&amp;Enum.reverse/1)
  end

  def parse_second(input) do
    rows = String.split(input, "\n")

    operators = 
      List.last(rows)
      |&gt; String.split(" ", trim: true)
        
    rows =
      rows
      |&gt; List.delete_at(length(rows) - 1)
      |&gt; Enum.map(&amp;String.graphemes/1)
      |&gt; Enum.zip()
      |&gt; Enum.map(&amp;Tuple.to_list/1)
      |&gt; Enum.map(&amp;Enum.join/1)
      |&gt; Enum.map(&amp;String.trim/1)
      |&gt; Enum.chunk_by(&amp;(&amp;1 == ""))
      |&gt; Enum.filter(fn chunk -&gt; chunk != [""] end)
      
    Enum.zip(operators, rows)
    |&gt; Enum.map(fn {operator, values} -&gt; [operator | values] end)  
  end

  def compute_column([operator | values]) do
    case operator do
      "*" -&gt;
        Enum.reduce(values, 1, fn value_str, acc -&gt;
          String.to_integer(value_str) * acc
        end)

      "+" -&gt;
        Enum.reduce(values, 0, fn value_str, acc -&gt;
          String.to_integer(value_str) + acc
        end)
    end
  end
end

#Part 1
Puzzle.parse_first(input)
|&gt; Enum.reduce(0, fn col, acc -&gt;
  acc + Puzzle.compute_column(col)
end)

#Part 2
Puzzle.parse_second(input)
|&gt; Enum.reduce(0, fn col, acc -&gt;
  acc + Puzzle.compute_column(col)
end)
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379450" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-379450" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379450"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="379452" data-post-id="379452">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="newton-peixoto" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  newton-peixoto
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Today was a very easy but nice problem</p>
<p><a href="https://github.com/newton-peixoto/advent-of-code/blob/main/2025/livebooks/day-06.livemd" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/newton-peixoto/advent-of-code/blob/main/2025/livebooks/day-06.livemd</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379452" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-379452" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379452"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="379455" data-post-id="379455">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zwippie" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zwippie/120/7143_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zwippie
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Erlang-Core-Team" data-username="bjorng" data-post="1" data-topic="73563">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bjorng/48/13187_2.png" class="avatar"> bjorng:</div>
<blockquote>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp transpose(list) do
  Enum.zip_with(list, &amp;Function.identity/1)
end
</code></pre>
</blockquote>
</aside>
<p>That one is going straight into my Aoc.Utils, thank you!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379455" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-379455" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379455"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="379460" data-post-id="379460">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="KeithFrost" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/KeithFrost/120/33263_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  KeithFrost
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h1><a name="p-379460-h-2025-dec-06-1" class="anchor" href="#p-379460-h-2025-dec-06-1" aria-label="Heading link" rel="nofollow"></a>2025 Dec 06</h1>
<h2><a name="p-379460-trash-compactor-2" class="anchor" href="#p-379460-trash-compactor-2" aria-label="Heading link" rel="nofollow"></a>Trash Compactor</h2>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Cephalopod do
  def parse_line(line, columns) do
    col_strs = String.split(line)
    columns = if columns == nil do
      Enum.map(col_strs, fn _ -&gt; [] end)
    else
      columns
    end
    Enum.zip_with(col_strs, columns, fn str, column -&gt;
      case Integer.parse(str) do
        :error -&gt;
          [String.to_atom(str) | column]
        {n, ""} -&gt;
          [n | column]
      end
    end)
  end

  def parse(lines) do
    Enum.reduce(lines, nil, &amp;parse_line/2)
  end

  def sum_work(columns) do
    Enum.reduce(columns, 0, fn column, sum -&gt; 
      case column do
        [:+ | ns] -&gt;
          sum + Enum.sum(ns)
        [:* | ns] -&gt;
          sum + Enum.product(ns)
      end
    end)
  end
end
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">test_input = """
123 328  51 64 
 45 64  387 23 
  6 98  215 314
*   +   *   +  
""" |&gt; String.split("\n", trim: true)
  |&gt; IO.inspect()
test1_work = Cephalopod.parse(test_input)
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">Cephalopod.sum_work(test1_work)
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">input_work = File.stream!(__DIR__ &lt;&gt; "/dec-06-input.txt")
  |&gt; Cephalopod.parse()
Cephalopod.sum_work(input_work)
</code></pre>
<h2><a name="p-379460-part-two-3" class="anchor" href="#p-379460-part-two-3" aria-label="Heading link" rel="nofollow"></a>Part Two</h2>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Cephalopod2 do
  def parse(lines) do
    flipped = Enum.map(lines, fn line -&gt; 
      to_charlist(String.trim_trailing(line, "\n"))
    end)
      |&gt; Enum.zip_with(&amp;Function.identity/1)
      |&gt; Enum.map(&amp;to_string/1)
    Enum.flat_map(flipped, fn s -&gt;
      case Regex.run(~r"^\s*(\d*)\s*([*+])?$", s) do
        [_match, ""] -&gt;
          []
        [_match, digits] -&gt;
          [String.to_integer(digits)]
        [_match, digits, op] -&gt;
          [String.to_atom(op), String.to_integer(digits)]
      end
    end)
  end

  def sum_work(formulae, op \\ nil, acc \\ nil, sum \\ 0) do
    case formulae do
      [:+ | rest] -&gt;
        sum = if acc != nil do
          sum + acc
        else
          sum
        end
        sum_work(rest, :+, 0, sum)
      [:* | rest] -&gt;
        sum = if acc != nil do
          sum + acc
        else
          sum
        end
        sum_work(rest, :*, 1, sum)
      [n | rest] -&gt;
        acc = case op do
          :* -&gt;
            n * acc
          :+ -&gt;
            n + acc
        end
        sum_work(rest, op, acc, sum)
      [] -&gt;
        sum + acc
    end
  end
end
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">test2_work = Cephalopod2.parse(test_input)
  |&gt; IO.inspect()
Cephalopod2.sum_work(test2_work)
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">input_work2 = File.stream!(__DIR__ &lt;&gt; "/dec-06-input.txt")
  |&gt; Cephalopod2.parse()
  |&gt; IO.inspect()
Cephalopod2.sum_work(input_work2)
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379460" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-379460" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379460"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="379463" data-post-id="379463">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="DavidB" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  DavidB
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Didn’t know about that one, would have made my life easier</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Enum.zip_with(list, &amp;Function.identity/1)
</code></pre>
<p>My original code, didn’t refactor, so not very readable :</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Day6 do
  def file, do: Parser.read_file(6)
  def test, do: Parser.read_file("test")

  def parse(input) do
    input
  end

  def solve(input \\ file()) do
    input
    |&gt; Enum.reduce(%{}, fn line, acc -&gt;
      line
      |&gt; String.split()
      |&gt; Stream.with_index()
      |&gt; Enum.reduce(acc, fn {value, index}, acc -&gt;
        Map.update(acc, index, [value], fn list -&gt; [value | list] end)
      end)
    end)
    |&gt; Map.values()
    |&gt; Enum.map(&amp;solve_line/1)
    |&gt; Enum.sum()
  end

  def solve_line(list) do
    [operation | rest] = list
    new_list = Enum.reverse(rest) |&gt; Enum.map(&amp;String.to_integer/1)
    calculate(new_list, operation)
  end

  def calculate(list, "+"), do: Enum.sum(list)
  def calculate(list, "*"), do: Enum.product(list)

  def solve_two(input \\ file()) do
    {operator_line, number_lines} = Enum.map(input, &amp;String.graphemes/1) |&gt; List.pop_at(-1)

    operator_line
    |&gt; get_operation_length
    |&gt; Enum.reduce({[], number_lines}, fn {operator, operation_length},
                                          {new_stuf, lines_to_cut} -&gt;
      {problem, rest} =
        Enum.reduce(lines_to_cut, {[], []}, fn line, {new, old} -&gt;
          {one, two} = line |&gt; Enum.split(operation_length)
          {new ++ [one], old ++ [two]}
        end)

      {[{operator, problem} | new_stuf], rest}
    end)
    |&gt; elem(0)
    |&gt; Enum.map(fn {operator, future_number} -&gt;
      future_number |&gt; build_number() |&gt; Enum.reverse() |&gt; calculate(operator)
    end)
    |&gt; Enum.sum()
  end

  def build_number(list) do
    list
    |&gt; Enum.reduce(%{}, fn list, acc -&gt;
      list
      |&gt; Stream.with_index()
      |&gt; Map.new(fn {k, v} -&gt; {v, k} end)
      |&gt; Map.merge(acc, fn _key, v1, v2 -&gt; [v1 | List.wrap(v2)] end)
    end)
    |&gt; Map.values()
    |&gt; Enum.map(fn list -&gt;
      list
      |&gt; Enum.join()
      |&gt; String.trim()
      |&gt; String.reverse()
    end)
    |&gt; Enum.reject(&amp;(&amp;1 == ""))
    |&gt; Enum.map(&amp;String.to_integer/1)
  end

  def get_operation_length(operator_line) do
    operator_line
    |&gt; Enum.reduce([], fn symbol, acc -&gt;
      case symbol do
        " " -&gt;
          [{operator, count} | rest] = acc
          [{operator, count + 1} | rest]

        operator -&gt;
          [{operator, 1} | acc]
      end
    end)
    |&gt; Enum.map(fn {op, count} -&gt; {op, count} end)
    |&gt; Enum.reverse()
  end
end

</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379463" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-379463" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379463"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="379464" data-post-id="379464">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="davewil" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/davewil/120/36706_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  davewil
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Apologies for those who recurse.</p>
<p>I love Elixir but I’m solving the problems in Go this year. I also felt day06 was a fussy problem not challenging. I parsed part 1 quickly and solved it. Then it was parse again with a rotated input. Ok, how do you rotate a grid, then apply use in the puzzle. That was about the only interesting bit.</p>
<p>My Go solution is here if anyone wants to look.</p>
<p><a href="https://github.com/davewil/aoc2025/blob/trunk/day06/day06.go" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/davewil/aoc2025/blob/trunk/day06/day06.go</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379464" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-379464" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379464"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="379503" data-post-id="379503">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="aloisdg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/aloisdg/120/39584_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  aloisdg
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Part 1</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">transpose = fn list -&gt; Enum.zip_with(list, &amp;Function.identity/1) end

values =
  File.read!("ids.txt")
  |&gt; String.split("\n")
  |&gt; Enum.map(&amp;(Regex.split(~r{\s+}, &amp;1, trim: true)))

transpose.(values)
|&gt; Enum.map(&amp;Enum.reverse/1)
|&gt; Enum.map(fn [head | tail] -&gt;
  case head do
    "*" -&gt; tail |&gt; Enum.map(&amp;String.to_integer/1) |&gt; Enum.product
    "+" -&gt; tail |&gt; Enum.map(&amp;String.to_integer/1) |&gt; Enum.sum
  end
end)
|&gt; Enum.sum
|&gt; IO.inspect

</code></pre>
<p>Part 2</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">transpose = fn list -&gt; Enum.zip_with(list, &amp;Function.identity/1) end

items =
  File.read!("ids.txt")
  |&gt; String.split("\n")
  |&gt; Enum.map(&amp;(String.split(&amp;1, "", trim: true)))

transpose.(items)
|&gt; Enum.map(&amp;Enum.reverse/1)
|&gt; Enum.map(fn [head | tail] -&gt; {head, tail |&gt; Enum.reverse |&gt; Enum.join("") |&gt; String.trim} end)
|&gt; Enum.chunk_by(fn {_, value} -&gt; value == "" end)
|&gt; Enum.reject(&amp;(&amp;1 == [{" ", ""}]))
|&gt; Enum.map(fn [{operand, value} | tail] -&gt;
  Enum.reduce(tail, String.to_integer(value), fn {_, x}, acc -&gt;
    case operand do
      "*" -&gt; acc * String.to_integer(x)
      "+" -&gt; acc + String.to_integer(x)
    end
  end)
end)
|&gt; Enum.sum
|&gt; IO.inspect

</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379503" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-379503" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379503"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="379505" data-post-id="379505">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="aloisdg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/aloisdg/120/39584_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  aloisdg
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>You can replace</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def mul(l), do: reduce(l, 1, &amp;(&amp;1 * &amp;2))
</code></pre>
<p>with</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def mul(l), do: reduce(l, &amp;*/2)
</code></pre>
<p>shorter and easier to read <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379505" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-379505" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379505"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="379511" data-post-id="379511">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hauleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/120/18942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hauleth
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><code>Enum.product(list)</code></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379511" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-379511" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379511"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="379512" data-post-id="379512">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="aloisdg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/aloisdg/120/39584_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  aloisdg
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Even better. Thank you!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379512" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2025-day-6/73563/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-379512" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379512"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/73563/load_more?page=3">Load more posts</a>
</div></template></turbo-stream>