moved some lambda abstraction code to bsnip.c