What do you mean "doesn't work"? Note that calling
print
with no arguments will just cause the function to print its end
argument, as per the docs.