How to use closure with ArrayHelper::map

As mentioned in the link(https://github.com/yiisoft/yii2/issues/10904) we can use closure to from and to parameters but, someone could please give an example of using closure there?