improve <eof> detection for short lambdas
minor cleanup
fix Array::slice