"FunctionType" ()

{ty1, ty2, }tyres

represents a function type with specified argument and result types.

Details

  • Function types can be used in Typed and related constructs to specify a type.

Expression Conversions

    From Expressions

  • CompiledCodeFunction expressions can be converted into compiled code elements with function types.
  • To Expressions

  • A code element representing a function type cannot currently be converted into an expression.

Examples

Basic Examples  (1)

Function types can be used as an input to a CompiledCodeFunction. Create a function that takes a "MachineInteger" as argument:

In[1]:=
Click for copyable input
Out[1]=

A function with argument of a function and a number:

In[2]:=
Click for copyable input
Out[2]=

Call the function passing in the appropriate arguments:

In[3]:=
Click for copyable input
Out[3]=