Compose function
Warning
This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.
Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.
Namespace: Microsoft.Quantum.Canon
Package: Microsoft.Quantum.Standard
Returns the composition of two functions.
function Compose<'T, 'U, 'V> (outer : ('U -> 'V), inner : ('T -> 'U)) : ('T -> 'V)
Description
Given two functions $f$ and $g$, returns a new function representing $f \circ g$.
Input
outer : 'U -> 'V
The second function to be applied.
inner : 'T -> 'U
The first function to be applied.
Output : 'T -> 'V
A new function $h$ such that for all inputs $x$, $f(g(x)) = h(x)$.
Type Parameters
'T
The input type of the first function to be applied.
'U
The output type of the first function to be applied and the input type of the second function to be applied.
'V
The output type of the second function to be applied.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for