Previous: Calling higher-order terms, Up: Higher-order [Contents]
In Mercury, the mode and determinism of a higher-order predicate or function term are generally part of that term’s inst, not its type. This allows a single higher-order predicate to work on argument predicates of different modes and determinism, which is particularly useful for library predicates such as ‘list.map’ and ‘list.foldl’.
• Builtin higher-order insts and modes: | ||
• Default insts for functions: | ||
• Combined higher-order types and insts: |