From 46bb285a3610822c75cb8ae65498b91d70a69412 Mon Sep 17 00:00:00 2001 From: Craig Roy Date: Mon, 14 Oct 2024 11:34:45 +0100 Subject: [PATCH] Add examples with polymorphic vectors --- brat/examples/fanout.brat | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/brat/examples/fanout.brat b/brat/examples/fanout.brat index 675792e..40bd647 100644 --- a/brat/examples/fanout.brat +++ b/brat/examples/fanout.brat @@ -22,3 +22,9 @@ ext "" f :: { Vec(Qubit, 2) -o Bit } g(Qubit, Qubit) -o Bit g = [\/]; f + +poly(X :: *) -> { Vec(X, 3) -> X, X, X } +poly(_) = { [/\] } + +poly2(X :: $) -> { X, X, X -o Vec(X, 3) } +poly2(_) = { [\/] }