Cmd W closes the document without quitting TextEdit. just tested on lion.
Mac is document-based instead of application-based so closing document doesn't quit the app. it only does if multiple documents doesn't make sense to the application like System Preferences.