Optimize lin_closure