Programming with Higher-Order Logic