Skip to main content
1 of 2

Lua, 8 bytes

f=load''

Try it online!

Defines a (global) function f.

This uses Lua load function to compile given string which happens to be empty in our case (empty code is valid code) into function which does exactly what we wrote in its body: nothing.