Re: [elixir-core:12096] const evaluation

2025-08-15 Thread benjamin...@gmail.com
to do this. > > > *José Valimhttps://dashbit.co/ <https://dashbit.co/>* > > > On Fri, Aug 8, 2025 at 1:07 PM benjamin...@gmail.com < > benjamin...@gmail.com> wrote: > >> Yeah, I should have been clearer, I'm looking for const evaluation of >> expressio

Re: [elixir-core:12092] const evaluation

2025-08-08 Thread benjamin...@gmail.com
lang > compiler (which we invoke) does it too. > > > *José Valimhttps://dashbit.co/ <https://dashbit.co/>* > > > On Wed, Aug 6, 2025 at 10:00 PM benjamin...@gmail.com < > benjamin...@gmail.com> wrote: > >> AFAIK, then the compiler does not perform co

[elixir-core:12090] const evaluation

2025-08-06 Thread benjamin...@gmail.com
AFAIK, then the compiler does not perform const evaluation. iex(9)> quote(do: 1+2*3) {:+, [context: Elixir, imports: [{1, Kernel}, {2, Kernel}]], [1, {:*, [context: Elixir, imports: [{2, Kernel}]], [2, 3]}]} iex(10)> quote(do: 1+2*3) 7 Are there any plans to implement this, if not what is the r

Re: [elixir-core:12081] [Proposal] Add List.prepend and List.append to easily pipe this operations

2025-06-05 Thread benjamin...@gmail.com
And we can’t forget about https://hexdocs.pm/elixir/List.html#insert_at/3 On Thursday, June 5, 2025 at 9:26:16 AM UTC+2 benjamin...@gmail.com wrote: > [el|list] is pipeable as well, and if you are working with Erlang > strings/binaries you can use > https://www.erlang.org/doc/ap

Re: [elixir-core:12080] [Proposal] Add List.prepend and List.append to easily pipe this operations

2025-06-05 Thread benjamin...@gmail.com
min...@gmail.com good point about `:lists.append/2` being available. > But I don't see how you can prepend with `:lists.flatten/2` in a way that's > pipe-able. Can you show an example? > > > On Wed, Jun 4, 2025 at 4:53 PM benjamin...@gmail.com < > benjamin...@gmail.com>

Re: [elixir-core:12078] [Proposal] Add List.prepend and List.append to easily pipe this operations

2025-06-04 Thread benjamin...@gmail.com
You can pipe into append and prepend today with https://www.erlang.org/doc/apps/stdlib/lists.html#append/2 and https://www.erlang.org/doc/apps/stdlib/lists.html#flatten/2 This feels like more of a documentation issue than something missing in the stdlib. On Monday, June 2, 2025 at 10:17:37 PM