function helpers to create functions easier and to curry and uncurry functions