"only" vs "[]"

pascal111 judas.the.messiah.111 at gmail.com
Mon Aug 8 11:35:48 UTC 2022


The output of next code is the same to extent that we feel that 
there's no difference between "only" and "[]", so what "only" 
added here?:

'''D
[1,2,3].writeln;
only(1,2,3).writeln;
'''

output:

[1, 2, 3]
[1, 2, 3]


More information about the Digitalmars-d-learn mailing list