support conditionals in sum{} and prod{}