Rework AND gates to support lambda inputs