Doesn't being nested inside a pure function make it pure?