This feature is available in midPoint 3.7 or later.
Function libraries are dedicated midPoint objects that contain set of reusable functions. The functions can be used in other mappings and expressions in midPoint. Function libraries can be used to group frequently-used parts of the code, therefore simplifying midPoint configuration and maintenance.
Please see Function Libraries Configuration page for configuration details.