Implement last-func in worker