« first day (607 days earlier)      last day (2040 days later) » 

I got to this, but that made me think that the answer is neither a function nor a program, but a REPL command
 
3:37 PM
@dzaima oooh that's clever
I didn't think of using 6/
 
ngn
@J.Sallé how much memory are we allowed to use? ⍳6⍴16 might lead to a shorter solution
 
@ngn the challenge doesn't specify, the only constraint is that the program needs to be able to print all the codes in the range #000000 to #FFFFFF
 
ngn
@J.Sallé well, this works on my laptop: '#',(⎕D,⎕A)[↑,⍳6⍴16]
 
@ngn oh nice. I didn't realize ⍳6⍴16 would also generate ⍳2*24 numbers
 
ngn
3:55 PM
@J.Sallé wait, i think i found an even shorter one :)
 
@ngn goddamnit I just finished posting that one lol
 
ngn
@J.Sallé i'm not sure if this is valid - it takes a long time and a lot of memory: ,(⎕d,6⍴⎕a)∘.,⍨⍣6⍕#
 
@ngn I don't think I can even understand that ⍨
the whole part after the parens that is
 
ngn
the challenge says "Write a program which generates and returns all 16,777,216 color variations within an array". if that array can be multidimensional, you could remove the leading ,
@J.Sallé it's an outer product of concatenation (∘.,) with swapped arguments (⍨) applied 6 times (⍣6) to '#' (⍕#)
 
@ngn aaaaaaaah now I got what the is doing there
somehow I was seeing 6⍕# and being like 'wut'
 

« first day (607 days earlier)      last day (2040 days later) »