Even though there are some answers here stating that the default implementation is "memory" based, this is plain wrong.
By default (5), it is using Marsaglia XOR-Shift algorithm, that has nothing to do with memory.
on
принимает ссылку на функцию, а не результат её выполнения.