Remove reference to instrinsic

Replace operation with function
This commit is contained in:
Akshob Gopalakrishna 2020-02-19 14:52:43 -08:00
Родитель 1005e646af
Коммит 2c57f5bacc
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -32,14 +32,17 @@ namespace Microsoft.Quantum.Arrays {
///
/// # Example
/// ```qsharp
/// open Microsoft.Quantum.Intrinsic;
/// open Microsoft.Quantum.Arrays;
/// open Microsoft.Quantum.Logical;
///
/// operation IsThreePresent() : Bool {
/// function IsThreePresent(): Bool {
/// let arrayOfInts = [1, 2, 3, 4, 5];
/// let is3Present = Any(EqualI(_, 3), arrayOfInts);
/// Message($"{is3Present}");
/// let is3Present = IsNumberPresentInArray(3, arrayOfInts);
/// return is3Present;
/// }
///
/// function IsNumberPresentInArray(n: Int, array: Int[]): Bool {
/// return Any(EqualI(_, n), array);
/// }
/// ```
function Any<'T> (predicate : ('T -> Bool), array : 'T[]) : Bool {