memoized reduce to stem