Previous: Impurity example, Up: Impurity [Contents]
Higher-order code can manipulate impure or semipure predicates and functions, provided that explicit purity annotations are used in three places: on the higher-order types, on lambda expressions, and on higher-order calls. (There are no purity annotations on higher-order insts and modes, however.)
• Purity annotations on higher-order types: | ||
• Purity annotations on lambda expressions: | ||
• Purity annotations on higher-order calls: |