This is because of a performance optimization called chunking. Essentially, a sequence is realized in groups of n elements called pieces. This means that you need to take care of any side effects in your mapping function. The end result is correct, you still get a sequence of the right length.
The default block size is 32, so if you increase your range to a value that exceeds this, you will realize that this is a bit better:
user> (defn seq-trial [] (map
If you need to avoid chunking, options are available.
sw1nn source share