Improves function creation a bit