Pass a fun instead of the stack