RosettaCodeData/Task/Multiple-distinct-objects/Julia/multiple-distinct-objects-1.julia
2018-06-22 20:57:24 +00:00

2 lines
162 B
Text

foo() = rand() # repeated calls change the result with each call
repeat([foo()], outer=5) # but this only calls foo() once, clones that first value