Its innocuous with this case, the list is short. If it were larger, a Enum.reverse/1 after building the list with 'consâing (the [ value | whole_list ]) is more efficient.
Is this some over-simplified example? I personally love comprehensions, but I wouldnât use one given the input and desired result. The simplest solution is:
{Enum.reverse(codons)}
Or perhaps Iâm misreading and you do not want reversed output, in which case the solution is even simpler: