extract anonymous functions