Merge fn and lambda

Closes #165.