mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
259 lines
No EOL
77 KiB
HTML
259 lines
No EOL
77 KiB
HTML
<!DOCTYPE HTML>
|
||
<html><head><meta charset="utf-8"><title>Function.Base</title><link rel="stylesheet" href="Agda.css"></head><body><pre class="Agda"><a id="1" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="74" class="Comment">-- The Agda standard library</a>
|
||
<a id="103" class="Comment">--</a>
|
||
<a id="106" class="Comment">-- Simple combinators working solely on and with functions</a>
|
||
<a id="165" class="Comment">------------------------------------------------------------------------</a>
|
||
|
||
<a id="239" class="Comment">-- The contents of this file can be accessed from `Function`.</a>
|
||
|
||
<a id="302" class="Symbol">{-#</a> <a id="306" class="Keyword">OPTIONS</a> <a id="314" class="Pragma">--cubical-compatible</a> <a id="335" class="Pragma">--safe</a> <a id="342" class="Symbol">#-}</a>
|
||
|
||
<a id="347" class="Keyword">module</a> <a id="354" href="Function.Base.html" class="Module">Function.Base</a> <a id="368" class="Keyword">where</a>
|
||
|
||
<a id="375" class="Keyword">open</a> <a id="380" class="Keyword">import</a> <a id="387" href="Level.html" class="Module">Level</a>
|
||
<a id="393" class="Keyword">open</a> <a id="398" class="Keyword">import</a> <a id="405" href="Strict.html" class="Module">Strict</a>
|
||
|
||
<a id="413" class="Keyword">private</a>
|
||
<a id="423" class="Keyword">variable</a>
|
||
<a id="436" href="Function.Base.html#436" class="Generalizable">a</a> <a id="438" href="Function.Base.html#438" class="Generalizable">b</a> <a id="440" href="Function.Base.html#440" class="Generalizable">c</a> <a id="442" href="Function.Base.html#442" class="Generalizable">d</a> <a id="444" href="Function.Base.html#444" class="Generalizable">e</a> <a id="446" class="Symbol">:</a> <a id="448" href="Agda.Primitive.html#591" class="Postulate">Level</a>
|
||
<a id="458" href="Function.Base.html#458" class="Generalizable">A</a> <a id="460" class="Symbol">:</a> <a id="462" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="466" href="Function.Base.html#436" class="Generalizable">a</a>
|
||
<a id="472" href="Function.Base.html#472" class="Generalizable">B</a> <a id="474" class="Symbol">:</a> <a id="476" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="480" href="Function.Base.html#438" class="Generalizable">b</a>
|
||
<a id="486" href="Function.Base.html#486" class="Generalizable">C</a> <a id="488" class="Symbol">:</a> <a id="490" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="494" href="Function.Base.html#440" class="Generalizable">c</a>
|
||
<a id="500" href="Function.Base.html#500" class="Generalizable">D</a> <a id="502" class="Symbol">:</a> <a id="504" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="508" href="Function.Base.html#442" class="Generalizable">d</a>
|
||
<a id="514" href="Function.Base.html#514" class="Generalizable">E</a> <a id="516" class="Symbol">:</a> <a id="518" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="522" href="Function.Base.html#444" class="Generalizable">e</a>
|
||
|
||
<a id="525" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="598" class="Comment">-- Some simple functions</a>
|
||
|
||
<a id="id"></a><a id="624" href="Function.Base.html#624" class="Function">id</a> <a id="627" class="Symbol">:</a> <a id="629" href="Function.Base.html#458" class="Generalizable">A</a> <a id="631" class="Symbol">→</a> <a id="633" href="Function.Base.html#458" class="Generalizable">A</a>
|
||
<a id="635" href="Function.Base.html#624" class="Function">id</a> <a id="638" href="Function.Base.html#638" class="Bound">x</a> <a id="640" class="Symbol">=</a> <a id="642" href="Function.Base.html#638" class="Bound">x</a>
|
||
|
||
<a id="const"></a><a id="645" href="Function.Base.html#645" class="Function">const</a> <a id="651" class="Symbol">:</a> <a id="653" href="Function.Base.html#458" class="Generalizable">A</a> <a id="655" class="Symbol">→</a> <a id="657" href="Function.Base.html#472" class="Generalizable">B</a> <a id="659" class="Symbol">→</a> <a id="661" href="Function.Base.html#458" class="Generalizable">A</a>
|
||
<a id="663" href="Function.Base.html#645" class="Function">const</a> <a id="669" href="Function.Base.html#669" class="Bound">x</a> <a id="671" class="Symbol">=</a> <a id="673" class="Symbol">λ</a> <a id="675" href="Function.Base.html#675" class="Bound">_</a> <a id="677" class="Symbol">→</a> <a id="679" href="Function.Base.html#669" class="Bound">x</a>
|
||
|
||
<a id="constᵣ"></a><a id="682" href="Function.Base.html#682" class="Function">constᵣ</a> <a id="689" class="Symbol">:</a> <a id="691" href="Function.Base.html#458" class="Generalizable">A</a> <a id="693" class="Symbol">→</a> <a id="695" href="Function.Base.html#472" class="Generalizable">B</a> <a id="697" class="Symbol">→</a> <a id="699" href="Function.Base.html#472" class="Generalizable">B</a>
|
||
<a id="701" href="Function.Base.html#682" class="Function">constᵣ</a> <a id="708" class="Symbol">_</a> <a id="710" class="Symbol">=</a> <a id="712" href="Function.Base.html#624" class="Function">id</a>
|
||
|
||
<a id="716" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="789" class="Comment">-- Operations on dependent functions</a>
|
||
|
||
<a id="827" class="Comment">-- These are functions whose output has a type that depends on the</a>
|
||
<a id="894" class="Comment">-- value of the input to the function.</a>
|
||
|
||
<a id="934" class="Keyword">infixr</a> <a id="941" class="Number">9</a> <a id="943" href="Function.Base.html#1040" class="Function Operator">_∘_</a> <a id="947" href="Function.Base.html#1228" class="Function Operator">_∘₂_</a>
|
||
<a id="952" class="Keyword">infixl</a> <a id="959" class="Number">8</a> <a id="961" href="Function.Base.html#2486" class="Function Operator">_ˢ_</a>
|
||
<a id="965" class="Keyword">infixl</a> <a id="972" class="Number">0</a> <a id="974" href="Function.Base.html#2219" class="Function Operator">_|>_</a>
|
||
<a id="979" class="Keyword">infix</a> <a id="986" class="Number">0</a> <a id="988" href="Function.Base.html#3043" class="Function Operator">case_return_of_</a>
|
||
<a id="1004" class="Keyword">infixr</a> <a id="1011" class="Number">-1</a> <a id="1014" href="Function.Base.html#1928" class="Function Operator">_$_</a> <a id="1018" href="Function.Base.html#2077" class="Function Operator">_$!_</a>
|
||
|
||
<a id="1024" class="Comment">-- Composition</a>
|
||
|
||
<a id="_∘_"></a><a id="1040" href="Function.Base.html#1040" class="Function Operator">_∘_</a> <a id="1044" class="Symbol">:</a> <a id="1046" class="Symbol">∀</a> <a id="1048" class="Symbol">{</a><a id="1049" href="Function.Base.html#1049" class="Bound">A</a> <a id="1051" class="Symbol">:</a> <a id="1053" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1057" href="Function.Base.html#436" class="Generalizable">a</a><a id="1058" class="Symbol">}</a> <a id="1060" class="Symbol">{</a><a id="1061" href="Function.Base.html#1061" class="Bound">B</a> <a id="1063" class="Symbol">:</a> <a id="1065" href="Function.Base.html#1049" class="Bound">A</a> <a id="1067" class="Symbol">→</a> <a id="1069" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1073" href="Function.Base.html#438" class="Generalizable">b</a><a id="1074" class="Symbol">}</a> <a id="1076" class="Symbol">{</a><a id="1077" href="Function.Base.html#1077" class="Bound">C</a> <a id="1079" class="Symbol">:</a> <a id="1081" class="Symbol">{</a><a id="1082" href="Function.Base.html#1082" class="Bound">x</a> <a id="1084" class="Symbol">:</a> <a id="1086" href="Function.Base.html#1049" class="Bound">A</a><a id="1087" class="Symbol">}</a> <a id="1089" class="Symbol">→</a> <a id="1091" href="Function.Base.html#1061" class="Bound">B</a> <a id="1093" href="Function.Base.html#1082" class="Bound">x</a> <a id="1095" class="Symbol">→</a> <a id="1097" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1101" href="Function.Base.html#440" class="Generalizable">c</a><a id="1102" class="Symbol">}</a> <a id="1104" class="Symbol">→</a>
|
||
<a id="1112" class="Symbol">(∀</a> <a id="1115" class="Symbol">{</a><a id="1116" href="Function.Base.html#1116" class="Bound">x</a><a id="1117" class="Symbol">}</a> <a id="1119" class="Symbol">(</a><a id="1120" href="Function.Base.html#1120" class="Bound">y</a> <a id="1122" class="Symbol">:</a> <a id="1124" href="Function.Base.html#1061" class="Bound">B</a> <a id="1126" href="Function.Base.html#1116" class="Bound">x</a><a id="1127" class="Symbol">)</a> <a id="1129" class="Symbol">→</a> <a id="1131" href="Function.Base.html#1077" class="Bound">C</a> <a id="1133" href="Function.Base.html#1120" class="Bound">y</a><a id="1134" class="Symbol">)</a> <a id="1136" class="Symbol">→</a> <a id="1138" class="Symbol">(</a><a id="1139" href="Function.Base.html#1139" class="Bound">g</a> <a id="1141" class="Symbol">:</a> <a id="1143" class="Symbol">(</a><a id="1144" href="Function.Base.html#1144" class="Bound">x</a> <a id="1146" class="Symbol">:</a> <a id="1148" href="Function.Base.html#1049" class="Bound">A</a><a id="1149" class="Symbol">)</a> <a id="1151" class="Symbol">→</a> <a id="1153" href="Function.Base.html#1061" class="Bound">B</a> <a id="1155" href="Function.Base.html#1144" class="Bound">x</a><a id="1156" class="Symbol">)</a> <a id="1158" class="Symbol">→</a>
|
||
<a id="1166" class="Symbol">((</a><a id="1168" href="Function.Base.html#1168" class="Bound">x</a> <a id="1170" class="Symbol">:</a> <a id="1172" href="Function.Base.html#1049" class="Bound">A</a><a id="1173" class="Symbol">)</a> <a id="1175" class="Symbol">→</a> <a id="1177" href="Function.Base.html#1077" class="Bound">C</a> <a id="1179" class="Symbol">(</a><a id="1180" href="Function.Base.html#1139" class="Bound">g</a> <a id="1182" href="Function.Base.html#1168" class="Bound">x</a><a id="1183" class="Symbol">))</a>
|
||
<a id="1186" href="Function.Base.html#1186" class="Bound">f</a> <a id="1188" href="Function.Base.html#1040" class="Function Operator">∘</a> <a id="1190" href="Function.Base.html#1190" class="Bound">g</a> <a id="1192" class="Symbol">=</a> <a id="1194" class="Symbol">λ</a> <a id="1196" href="Function.Base.html#1196" class="Bound">x</a> <a id="1198" class="Symbol">→</a> <a id="1200" href="Function.Base.html#1186" class="Bound">f</a> <a id="1202" class="Symbol">(</a><a id="1203" href="Function.Base.html#1190" class="Bound">g</a> <a id="1205" href="Function.Base.html#1196" class="Bound">x</a><a id="1206" class="Symbol">)</a>
|
||
<a id="1208" class="Symbol">{-#</a> <a id="1212" class="Keyword">INLINE</a> <a id="1219" href="Function.Base.html#1040" class="Function Operator">_∘_</a> <a id="1223" class="Symbol">#-}</a>
|
||
|
||
<a id="_∘₂_"></a><a id="1228" href="Function.Base.html#1228" class="Function Operator">_∘₂_</a> <a id="1233" class="Symbol">:</a> <a id="1235" class="Symbol">∀</a> <a id="1237" class="Symbol">{</a><a id="1238" href="Function.Base.html#1238" class="Bound">A₁</a> <a id="1241" class="Symbol">:</a> <a id="1243" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1247" href="Function.Base.html#436" class="Generalizable">a</a><a id="1248" class="Symbol">}</a> <a id="1250" class="Symbol">{</a><a id="1251" href="Function.Base.html#1251" class="Bound">A₂</a> <a id="1254" class="Symbol">:</a> <a id="1256" href="Function.Base.html#1238" class="Bound">A₁</a> <a id="1259" class="Symbol">→</a> <a id="1261" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1265" href="Function.Base.html#442" class="Generalizable">d</a><a id="1266" class="Symbol">}</a>
|
||
<a id="1277" class="Symbol">{</a><a id="1278" href="Function.Base.html#1278" class="Bound">B</a> <a id="1280" class="Symbol">:</a> <a id="1282" class="Symbol">(</a><a id="1283" href="Function.Base.html#1283" class="Bound">x</a> <a id="1285" class="Symbol">:</a> <a id="1287" href="Function.Base.html#1238" class="Bound">A₁</a><a id="1289" class="Symbol">)</a> <a id="1291" class="Symbol">→</a> <a id="1293" href="Function.Base.html#1251" class="Bound">A₂</a> <a id="1296" href="Function.Base.html#1283" class="Bound">x</a> <a id="1298" class="Symbol">→</a> <a id="1300" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1304" href="Function.Base.html#438" class="Generalizable">b</a><a id="1305" class="Symbol">}</a>
|
||
<a id="1316" class="Symbol">{</a><a id="1317" href="Function.Base.html#1317" class="Bound">C</a> <a id="1319" class="Symbol">:</a> <a id="1321" class="Symbol">{</a><a id="1322" href="Function.Base.html#1322" class="Bound">x</a> <a id="1324" class="Symbol">:</a> <a id="1326" href="Function.Base.html#1238" class="Bound">A₁</a><a id="1328" class="Symbol">}</a> <a id="1330" class="Symbol">→</a> <a id="1332" class="Symbol">{</a><a id="1333" href="Function.Base.html#1333" class="Bound">y</a> <a id="1335" class="Symbol">:</a> <a id="1337" href="Function.Base.html#1251" class="Bound">A₂</a> <a id="1340" href="Function.Base.html#1322" class="Bound">x</a><a id="1341" class="Symbol">}</a> <a id="1343" class="Symbol">→</a> <a id="1345" href="Function.Base.html#1278" class="Bound">B</a> <a id="1347" href="Function.Base.html#1322" class="Bound">x</a> <a id="1349" href="Function.Base.html#1333" class="Bound">y</a> <a id="1351" class="Symbol">→</a> <a id="1353" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1357" href="Function.Base.html#440" class="Generalizable">c</a><a id="1358" class="Symbol">}</a> <a id="1360" class="Symbol">→</a>
|
||
<a id="1369" class="Symbol">({</a><a id="1371" href="Function.Base.html#1371" class="Bound">x</a> <a id="1373" class="Symbol">:</a> <a id="1375" href="Function.Base.html#1238" class="Bound">A₁</a><a id="1377" class="Symbol">}</a> <a id="1379" class="Symbol">→</a> <a id="1381" class="Symbol">{</a><a id="1382" href="Function.Base.html#1382" class="Bound">y</a> <a id="1384" class="Symbol">:</a> <a id="1386" href="Function.Base.html#1251" class="Bound">A₂</a> <a id="1389" href="Function.Base.html#1371" class="Bound">x</a><a id="1390" class="Symbol">}</a> <a id="1392" class="Symbol">→</a> <a id="1394" class="Symbol">(</a><a id="1395" href="Function.Base.html#1395" class="Bound">z</a> <a id="1397" class="Symbol">:</a> <a id="1399" href="Function.Base.html#1278" class="Bound">B</a> <a id="1401" href="Function.Base.html#1371" class="Bound">x</a> <a id="1403" href="Function.Base.html#1382" class="Bound">y</a><a id="1404" class="Symbol">)</a> <a id="1406" class="Symbol">→</a> <a id="1408" href="Function.Base.html#1317" class="Bound">C</a> <a id="1410" href="Function.Base.html#1395" class="Bound">z</a><a id="1411" class="Symbol">)</a> <a id="1413" class="Symbol">→</a>
|
||
<a id="1422" class="Symbol">(</a><a id="1423" href="Function.Base.html#1423" class="Bound">g</a> <a id="1425" class="Symbol">:</a> <a id="1427" class="Symbol">(</a><a id="1428" href="Function.Base.html#1428" class="Bound">x</a> <a id="1430" class="Symbol">:</a> <a id="1432" href="Function.Base.html#1238" class="Bound">A₁</a><a id="1434" class="Symbol">)</a> <a id="1436" class="Symbol">→</a> <a id="1438" class="Symbol">(</a><a id="1439" href="Function.Base.html#1439" class="Bound">y</a> <a id="1441" class="Symbol">:</a> <a id="1443" href="Function.Base.html#1251" class="Bound">A₂</a> <a id="1446" href="Function.Base.html#1428" class="Bound">x</a><a id="1447" class="Symbol">)</a> <a id="1449" class="Symbol">→</a> <a id="1451" href="Function.Base.html#1278" class="Bound">B</a> <a id="1453" href="Function.Base.html#1428" class="Bound">x</a> <a id="1455" href="Function.Base.html#1439" class="Bound">y</a><a id="1456" class="Symbol">)</a> <a id="1458" class="Symbol">→</a>
|
||
<a id="1467" class="Symbol">((</a><a id="1469" href="Function.Base.html#1469" class="Bound">x</a> <a id="1471" class="Symbol">:</a> <a id="1473" href="Function.Base.html#1238" class="Bound">A₁</a><a id="1475" class="Symbol">)</a> <a id="1477" class="Symbol">→</a> <a id="1479" class="Symbol">(</a><a id="1480" href="Function.Base.html#1480" class="Bound">y</a> <a id="1482" class="Symbol">:</a> <a id="1484" href="Function.Base.html#1251" class="Bound">A₂</a> <a id="1487" href="Function.Base.html#1469" class="Bound">x</a><a id="1488" class="Symbol">)</a> <a id="1490" class="Symbol">→</a> <a id="1492" href="Function.Base.html#1317" class="Bound">C</a> <a id="1494" class="Symbol">(</a><a id="1495" href="Function.Base.html#1423" class="Bound">g</a> <a id="1497" href="Function.Base.html#1469" class="Bound">x</a> <a id="1499" href="Function.Base.html#1480" class="Bound">y</a><a id="1500" class="Symbol">))</a>
|
||
<a id="1503" href="Function.Base.html#1503" class="Bound">f</a> <a id="1505" href="Function.Base.html#1228" class="Function Operator">∘₂</a> <a id="1508" href="Function.Base.html#1508" class="Bound">g</a> <a id="1510" class="Symbol">=</a> <a id="1512" class="Symbol">λ</a> <a id="1514" href="Function.Base.html#1514" class="Bound">x</a> <a id="1516" href="Function.Base.html#1516" class="Bound">y</a> <a id="1518" class="Symbol">→</a> <a id="1520" href="Function.Base.html#1503" class="Bound">f</a> <a id="1522" class="Symbol">(</a><a id="1523" href="Function.Base.html#1508" class="Bound">g</a> <a id="1525" href="Function.Base.html#1514" class="Bound">x</a> <a id="1527" href="Function.Base.html#1516" class="Bound">y</a><a id="1528" class="Symbol">)</a>
|
||
|
||
<a id="1531" class="Comment">-- Flipping order of arguments</a>
|
||
|
||
<a id="flip"></a><a id="1563" href="Function.Base.html#1563" class="Function">flip</a> <a id="1568" class="Symbol">:</a> <a id="1570" class="Symbol">∀</a> <a id="1572" class="Symbol">{</a><a id="1573" href="Function.Base.html#1573" class="Bound">A</a> <a id="1575" class="Symbol">:</a> <a id="1577" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1581" href="Function.Base.html#436" class="Generalizable">a</a><a id="1582" class="Symbol">}</a> <a id="1584" class="Symbol">{</a><a id="1585" href="Function.Base.html#1585" class="Bound">B</a> <a id="1587" class="Symbol">:</a> <a id="1589" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1593" href="Function.Base.html#438" class="Generalizable">b</a><a id="1594" class="Symbol">}</a> <a id="1596" class="Symbol">{</a><a id="1597" href="Function.Base.html#1597" class="Bound">C</a> <a id="1599" class="Symbol">:</a> <a id="1601" href="Function.Base.html#1573" class="Bound">A</a> <a id="1603" class="Symbol">→</a> <a id="1605" href="Function.Base.html#1585" class="Bound">B</a> <a id="1607" class="Symbol">→</a> <a id="1609" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1613" href="Function.Base.html#440" class="Generalizable">c</a><a id="1614" class="Symbol">}</a> <a id="1616" class="Symbol">→</a>
|
||
<a id="1625" class="Symbol">((</a><a id="1627" href="Function.Base.html#1627" class="Bound">x</a> <a id="1629" class="Symbol">:</a> <a id="1631" href="Function.Base.html#1573" class="Bound">A</a><a id="1632" class="Symbol">)</a> <a id="1634" class="Symbol">(</a><a id="1635" href="Function.Base.html#1635" class="Bound">y</a> <a id="1637" class="Symbol">:</a> <a id="1639" href="Function.Base.html#1585" class="Bound">B</a><a id="1640" class="Symbol">)</a> <a id="1642" class="Symbol">→</a> <a id="1644" href="Function.Base.html#1597" class="Bound">C</a> <a id="1646" href="Function.Base.html#1627" class="Bound">x</a> <a id="1648" href="Function.Base.html#1635" class="Bound">y</a><a id="1649" class="Symbol">)</a> <a id="1651" class="Symbol">→</a> <a id="1653" class="Symbol">((</a><a id="1655" href="Function.Base.html#1655" class="Bound">y</a> <a id="1657" class="Symbol">:</a> <a id="1659" href="Function.Base.html#1585" class="Bound">B</a><a id="1660" class="Symbol">)</a> <a id="1662" class="Symbol">(</a><a id="1663" href="Function.Base.html#1663" class="Bound">x</a> <a id="1665" class="Symbol">:</a> <a id="1667" href="Function.Base.html#1573" class="Bound">A</a><a id="1668" class="Symbol">)</a> <a id="1670" class="Symbol">→</a> <a id="1672" href="Function.Base.html#1597" class="Bound">C</a> <a id="1674" href="Function.Base.html#1663" class="Bound">x</a> <a id="1676" href="Function.Base.html#1655" class="Bound">y</a><a id="1677" class="Symbol">)</a>
|
||
<a id="1679" href="Function.Base.html#1563" class="Function">flip</a> <a id="1684" href="Function.Base.html#1684" class="Bound">f</a> <a id="1686" class="Symbol">=</a> <a id="1688" class="Symbol">λ</a> <a id="1690" href="Function.Base.html#1690" class="Bound">y</a> <a id="1692" href="Function.Base.html#1692" class="Bound">x</a> <a id="1694" class="Symbol">→</a> <a id="1696" href="Function.Base.html#1684" class="Bound">f</a> <a id="1698" href="Function.Base.html#1692" class="Bound">x</a> <a id="1700" href="Function.Base.html#1690" class="Bound">y</a>
|
||
<a id="1702" class="Symbol">{-#</a> <a id="1706" class="Keyword">INLINE</a> <a id="1713" href="Function.Base.html#1563" class="Function">flip</a> <a id="1718" class="Symbol">#-}</a>
|
||
|
||
<a id="1723" class="Comment">-- Application - note that _$_ is right associative, as in Haskell.</a>
|
||
<a id="1791" class="Comment">-- If you want a left associative infix application operator, use</a>
|
||
<a id="1857" class="Comment">-- Category.Functor._<$>_ from Category.Monad.Identity.IdentityMonad.</a>
|
||
|
||
<a id="_$_"></a><a id="1928" href="Function.Base.html#1928" class="Function Operator">_$_</a> <a id="1932" class="Symbol">:</a> <a id="1934" class="Symbol">∀</a> <a id="1936" class="Symbol">{</a><a id="1937" href="Function.Base.html#1937" class="Bound">A</a> <a id="1939" class="Symbol">:</a> <a id="1941" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1945" href="Function.Base.html#436" class="Generalizable">a</a><a id="1946" class="Symbol">}</a> <a id="1948" class="Symbol">{</a><a id="1949" href="Function.Base.html#1949" class="Bound">B</a> <a id="1951" class="Symbol">:</a> <a id="1953" href="Function.Base.html#1937" class="Bound">A</a> <a id="1955" class="Symbol">→</a> <a id="1957" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1961" href="Function.Base.html#438" class="Generalizable">b</a><a id="1962" class="Symbol">}</a> <a id="1964" class="Symbol">→</a>
|
||
<a id="1972" class="Symbol">((</a><a id="1974" href="Function.Base.html#1974" class="Bound">x</a> <a id="1976" class="Symbol">:</a> <a id="1978" href="Function.Base.html#1937" class="Bound">A</a><a id="1979" class="Symbol">)</a> <a id="1981" class="Symbol">→</a> <a id="1983" href="Function.Base.html#1949" class="Bound">B</a> <a id="1985" href="Function.Base.html#1974" class="Bound">x</a><a id="1986" class="Symbol">)</a> <a id="1988" class="Symbol">→</a> <a id="1990" class="Symbol">((</a><a id="1992" href="Function.Base.html#1992" class="Bound">x</a> <a id="1994" class="Symbol">:</a> <a id="1996" href="Function.Base.html#1937" class="Bound">A</a><a id="1997" class="Symbol">)</a> <a id="1999" class="Symbol">→</a> <a id="2001" href="Function.Base.html#1949" class="Bound">B</a> <a id="2003" href="Function.Base.html#1992" class="Bound">x</a><a id="2004" class="Symbol">)</a>
|
||
<a id="2006" href="Function.Base.html#2006" class="Bound">f</a> <a id="2008" href="Function.Base.html#1928" class="Function Operator">$</a> <a id="2010" href="Function.Base.html#2010" class="Bound">x</a> <a id="2012" class="Symbol">=</a> <a id="2014" href="Function.Base.html#2006" class="Bound">f</a> <a id="2016" href="Function.Base.html#2010" class="Bound">x</a>
|
||
<a id="2018" class="Symbol">{-#</a> <a id="2022" class="Keyword">INLINE</a> <a id="2029" href="Function.Base.html#1928" class="Function Operator">_$_</a> <a id="2033" class="Symbol">#-}</a>
|
||
|
||
<a id="2038" class="Comment">-- Strict (call-by-value) application</a>
|
||
|
||
<a id="_$!_"></a><a id="2077" href="Function.Base.html#2077" class="Function Operator">_$!_</a> <a id="2082" class="Symbol">:</a> <a id="2084" class="Symbol">∀</a> <a id="2086" class="Symbol">{</a><a id="2087" href="Function.Base.html#2087" class="Bound">A</a> <a id="2089" class="Symbol">:</a> <a id="2091" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2095" href="Function.Base.html#436" class="Generalizable">a</a><a id="2096" class="Symbol">}</a> <a id="2098" class="Symbol">{</a><a id="2099" href="Function.Base.html#2099" class="Bound">B</a> <a id="2101" class="Symbol">:</a> <a id="2103" href="Function.Base.html#2087" class="Bound">A</a> <a id="2105" class="Symbol">→</a> <a id="2107" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2111" href="Function.Base.html#438" class="Generalizable">b</a><a id="2112" class="Symbol">}</a> <a id="2114" class="Symbol">→</a>
|
||
<a id="2123" class="Symbol">((</a><a id="2125" href="Function.Base.html#2125" class="Bound">x</a> <a id="2127" class="Symbol">:</a> <a id="2129" href="Function.Base.html#2087" class="Bound">A</a><a id="2130" class="Symbol">)</a> <a id="2132" class="Symbol">→</a> <a id="2134" href="Function.Base.html#2099" class="Bound">B</a> <a id="2136" href="Function.Base.html#2125" class="Bound">x</a><a id="2137" class="Symbol">)</a> <a id="2139" class="Symbol">→</a> <a id="2141" class="Symbol">((</a><a id="2143" href="Function.Base.html#2143" class="Bound">x</a> <a id="2145" class="Symbol">:</a> <a id="2147" href="Function.Base.html#2087" class="Bound">A</a><a id="2148" class="Symbol">)</a> <a id="2150" class="Symbol">→</a> <a id="2152" href="Function.Base.html#2099" class="Bound">B</a> <a id="2154" href="Function.Base.html#2143" class="Bound">x</a><a id="2155" class="Symbol">)</a>
|
||
<a id="2157" href="Function.Base.html#2077" class="Function Operator">_$!_</a> <a id="2162" class="Symbol">=</a> <a id="2164" href="Function.Base.html#1563" class="Function">flip</a> <a id="2169" href="Agda.Builtin.Strict.html#161" class="Primitive">force</a>
|
||
|
||
<a id="2176" class="Comment">-- Flipped application (aka pipe-forward)</a>
|
||
|
||
<a id="_|>_"></a><a id="2219" href="Function.Base.html#2219" class="Function Operator">_|>_</a> <a id="2224" class="Symbol">:</a> <a id="2226" class="Symbol">∀</a> <a id="2228" class="Symbol">{</a><a id="2229" href="Function.Base.html#2229" class="Bound">A</a> <a id="2231" class="Symbol">:</a> <a id="2233" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2237" href="Function.Base.html#436" class="Generalizable">a</a><a id="2238" class="Symbol">}</a> <a id="2240" class="Symbol">{</a><a id="2241" href="Function.Base.html#2241" class="Bound">B</a> <a id="2243" class="Symbol">:</a> <a id="2245" href="Function.Base.html#2229" class="Bound">A</a> <a id="2247" class="Symbol">→</a> <a id="2249" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2253" href="Function.Base.html#438" class="Generalizable">b</a><a id="2254" class="Symbol">}</a> <a id="2256" class="Symbol">→</a>
|
||
<a id="2265" class="Symbol">(</a><a id="2266" href="Function.Base.html#2266" class="Bound">a</a> <a id="2268" class="Symbol">:</a> <a id="2270" href="Function.Base.html#2229" class="Bound">A</a><a id="2271" class="Symbol">)</a> <a id="2273" class="Symbol">→</a> <a id="2275" class="Symbol">(∀</a> <a id="2278" href="Function.Base.html#2278" class="Bound">a</a> <a id="2280" class="Symbol">→</a> <a id="2282" href="Function.Base.html#2241" class="Bound">B</a> <a id="2284" href="Function.Base.html#2278" class="Bound">a</a><a id="2285" class="Symbol">)</a> <a id="2287" class="Symbol">→</a> <a id="2289" href="Function.Base.html#2241" class="Bound">B</a> <a id="2291" href="Function.Base.html#2266" class="Bound">a</a>
|
||
<a id="2293" href="Function.Base.html#2219" class="Function Operator">_|>_</a> <a id="2298" class="Symbol">=</a> <a id="2300" href="Function.Base.html#1563" class="Function">flip</a> <a id="2305" href="Function.Base.html#1928" class="Function Operator">_$_</a>
|
||
<a id="2309" class="Symbol">{-#</a> <a id="2313" class="Keyword">INLINE</a> <a id="2320" href="Function.Base.html#2219" class="Function Operator">_|>_</a> <a id="2325" class="Symbol">#-}</a>
|
||
|
||
<a id="2330" class="Comment">-- The S combinator - written infix as in Conor McBride's paper</a>
|
||
<a id="2394" class="Comment">-- "Outrageous but Meaningful Coincidences: Dependent type-safe syntax</a>
|
||
<a id="2465" class="Comment">-- and evaluation".</a>
|
||
|
||
<a id="_ˢ_"></a><a id="2486" href="Function.Base.html#2486" class="Function Operator">_ˢ_</a> <a id="2490" class="Symbol">:</a> <a id="2492" class="Symbol">∀</a> <a id="2494" class="Symbol">{</a><a id="2495" href="Function.Base.html#2495" class="Bound">A</a> <a id="2497" class="Symbol">:</a> <a id="2499" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2503" href="Function.Base.html#436" class="Generalizable">a</a><a id="2504" class="Symbol">}</a> <a id="2506" class="Symbol">{</a><a id="2507" href="Function.Base.html#2507" class="Bound">B</a> <a id="2509" class="Symbol">:</a> <a id="2511" href="Function.Base.html#2495" class="Bound">A</a> <a id="2513" class="Symbol">→</a> <a id="2515" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2519" href="Function.Base.html#438" class="Generalizable">b</a><a id="2520" class="Symbol">}</a> <a id="2522" class="Symbol">{</a><a id="2523" href="Function.Base.html#2523" class="Bound">C</a> <a id="2525" class="Symbol">:</a> <a id="2527" class="Symbol">(</a><a id="2528" href="Function.Base.html#2528" class="Bound">x</a> <a id="2530" class="Symbol">:</a> <a id="2532" href="Function.Base.html#2495" class="Bound">A</a><a id="2533" class="Symbol">)</a> <a id="2535" class="Symbol">→</a> <a id="2537" href="Function.Base.html#2507" class="Bound">B</a> <a id="2539" href="Function.Base.html#2528" class="Bound">x</a> <a id="2541" class="Symbol">→</a> <a id="2543" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2547" href="Function.Base.html#440" class="Generalizable">c</a><a id="2548" class="Symbol">}</a> <a id="2550" class="Symbol">→</a>
|
||
<a id="2558" class="Symbol">((</a><a id="2560" href="Function.Base.html#2560" class="Bound">x</a> <a id="2562" class="Symbol">:</a> <a id="2564" href="Function.Base.html#2495" class="Bound">A</a><a id="2565" class="Symbol">)</a> <a id="2567" class="Symbol">(</a><a id="2568" href="Function.Base.html#2568" class="Bound">y</a> <a id="2570" class="Symbol">:</a> <a id="2572" href="Function.Base.html#2507" class="Bound">B</a> <a id="2574" href="Function.Base.html#2560" class="Bound">x</a><a id="2575" class="Symbol">)</a> <a id="2577" class="Symbol">→</a> <a id="2579" href="Function.Base.html#2523" class="Bound">C</a> <a id="2581" href="Function.Base.html#2560" class="Bound">x</a> <a id="2583" href="Function.Base.html#2568" class="Bound">y</a><a id="2584" class="Symbol">)</a> <a id="2586" class="Symbol">→</a>
|
||
<a id="2594" class="Symbol">(</a><a id="2595" href="Function.Base.html#2595" class="Bound">g</a> <a id="2597" class="Symbol">:</a> <a id="2599" class="Symbol">(</a><a id="2600" href="Function.Base.html#2600" class="Bound">x</a> <a id="2602" class="Symbol">:</a> <a id="2604" href="Function.Base.html#2495" class="Bound">A</a><a id="2605" class="Symbol">)</a> <a id="2607" class="Symbol">→</a> <a id="2609" href="Function.Base.html#2507" class="Bound">B</a> <a id="2611" href="Function.Base.html#2600" class="Bound">x</a><a id="2612" class="Symbol">)</a> <a id="2614" class="Symbol">→</a>
|
||
<a id="2622" class="Symbol">((</a><a id="2624" href="Function.Base.html#2624" class="Bound">x</a> <a id="2626" class="Symbol">:</a> <a id="2628" href="Function.Base.html#2495" class="Bound">A</a><a id="2629" class="Symbol">)</a> <a id="2631" class="Symbol">→</a> <a id="2633" href="Function.Base.html#2523" class="Bound">C</a> <a id="2635" href="Function.Base.html#2624" class="Bound">x</a> <a id="2637" class="Symbol">(</a><a id="2638" href="Function.Base.html#2595" class="Bound">g</a> <a id="2640" href="Function.Base.html#2624" class="Bound">x</a><a id="2641" class="Symbol">))</a>
|
||
<a id="2644" href="Function.Base.html#2644" class="Bound">f</a> <a id="2646" href="Function.Base.html#2486" class="Function Operator">ˢ</a> <a id="2648" href="Function.Base.html#2648" class="Bound">g</a> <a id="2650" class="Symbol">=</a> <a id="2652" class="Symbol">λ</a> <a id="2654" href="Function.Base.html#2654" class="Bound">x</a> <a id="2656" class="Symbol">→</a> <a id="2658" href="Function.Base.html#2644" class="Bound">f</a> <a id="2660" href="Function.Base.html#2654" class="Bound">x</a> <a id="2662" class="Symbol">(</a><a id="2663" href="Function.Base.html#2648" class="Bound">g</a> <a id="2665" href="Function.Base.html#2654" class="Bound">x</a><a id="2666" class="Symbol">)</a>
|
||
<a id="2668" class="Symbol">{-#</a> <a id="2672" class="Keyword">INLINE</a> <a id="2679" href="Function.Base.html#2486" class="Function Operator">_ˢ_</a> <a id="2683" class="Symbol">#-}</a>
|
||
|
||
<a id="2688" class="Comment">-- Converting between implicit and explicit function spaces.</a>
|
||
|
||
<a id="_$-"></a><a id="2750" href="Function.Base.html#2750" class="Function Operator">_$-</a> <a id="2754" class="Symbol">:</a> <a id="2756" class="Symbol">∀</a> <a id="2758" class="Symbol">{</a><a id="2759" href="Function.Base.html#2759" class="Bound">A</a> <a id="2761" class="Symbol">:</a> <a id="2763" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2767" href="Function.Base.html#436" class="Generalizable">a</a><a id="2768" class="Symbol">}</a> <a id="2770" class="Symbol">{</a><a id="2771" href="Function.Base.html#2771" class="Bound">B</a> <a id="2773" class="Symbol">:</a> <a id="2775" href="Function.Base.html#2759" class="Bound">A</a> <a id="2777" class="Symbol">→</a> <a id="2779" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2783" href="Function.Base.html#438" class="Generalizable">b</a><a id="2784" class="Symbol">}</a> <a id="2786" class="Symbol">→</a> <a id="2788" class="Symbol">((</a><a id="2790" href="Function.Base.html#2790" class="Bound">x</a> <a id="2792" class="Symbol">:</a> <a id="2794" href="Function.Base.html#2759" class="Bound">A</a><a id="2795" class="Symbol">)</a> <a id="2797" class="Symbol">→</a> <a id="2799" href="Function.Base.html#2771" class="Bound">B</a> <a id="2801" href="Function.Base.html#2790" class="Bound">x</a><a id="2802" class="Symbol">)</a> <a id="2804" class="Symbol">→</a> <a id="2806" class="Symbol">({</a><a id="2808" href="Function.Base.html#2808" class="Bound">x</a> <a id="2810" class="Symbol">:</a> <a id="2812" href="Function.Base.html#2759" class="Bound">A</a><a id="2813" class="Symbol">}</a> <a id="2815" class="Symbol">→</a> <a id="2817" href="Function.Base.html#2771" class="Bound">B</a> <a id="2819" href="Function.Base.html#2808" class="Bound">x</a><a id="2820" class="Symbol">)</a>
|
||
<a id="2822" href="Function.Base.html#2822" class="Bound">f</a> <a id="2824" href="Function.Base.html#2750" class="Function Operator">$-</a> <a id="2827" class="Symbol">=</a> <a id="2829" href="Function.Base.html#2822" class="Bound">f</a> <a id="2831" class="Symbol">_</a>
|
||
<a id="2833" class="Symbol">{-#</a> <a id="2837" class="Keyword">INLINE</a> <a id="2844" href="Function.Base.html#2750" class="Function Operator">_$-</a> <a id="2848" class="Symbol">#-}</a>
|
||
|
||
<a id="λ-"></a><a id="2853" href="Function.Base.html#2853" class="Function">λ-</a> <a id="2856" class="Symbol">:</a> <a id="2858" class="Symbol">∀</a> <a id="2860" class="Symbol">{</a><a id="2861" href="Function.Base.html#2861" class="Bound">A</a> <a id="2863" class="Symbol">:</a> <a id="2865" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2869" href="Function.Base.html#436" class="Generalizable">a</a><a id="2870" class="Symbol">}</a> <a id="2872" class="Symbol">{</a><a id="2873" href="Function.Base.html#2873" class="Bound">B</a> <a id="2875" class="Symbol">:</a> <a id="2877" href="Function.Base.html#2861" class="Bound">A</a> <a id="2879" class="Symbol">→</a> <a id="2881" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2885" href="Function.Base.html#438" class="Generalizable">b</a><a id="2886" class="Symbol">}</a> <a id="2888" class="Symbol">→</a> <a id="2890" class="Symbol">({</a><a id="2892" href="Function.Base.html#2892" class="Bound">x</a> <a id="2894" class="Symbol">:</a> <a id="2896" href="Function.Base.html#2861" class="Bound">A</a><a id="2897" class="Symbol">}</a> <a id="2899" class="Symbol">→</a> <a id="2901" href="Function.Base.html#2873" class="Bound">B</a> <a id="2903" href="Function.Base.html#2892" class="Bound">x</a><a id="2904" class="Symbol">)</a> <a id="2906" class="Symbol">→</a> <a id="2908" class="Symbol">((</a><a id="2910" href="Function.Base.html#2910" class="Bound">x</a> <a id="2912" class="Symbol">:</a> <a id="2914" href="Function.Base.html#2861" class="Bound">A</a><a id="2915" class="Symbol">)</a> <a id="2917" class="Symbol">→</a> <a id="2919" href="Function.Base.html#2873" class="Bound">B</a> <a id="2921" href="Function.Base.html#2910" class="Bound">x</a><a id="2922" class="Symbol">)</a>
|
||
<a id="2924" href="Function.Base.html#2853" class="Function">λ-</a> <a id="2927" href="Function.Base.html#2927" class="Bound">f</a> <a id="2929" class="Symbol">=</a> <a id="2931" class="Symbol">λ</a> <a id="2933" href="Function.Base.html#2933" class="Bound">x</a> <a id="2935" class="Symbol">→</a> <a id="2937" href="Function.Base.html#2927" class="Bound">f</a>
|
||
<a id="2939" class="Symbol">{-#</a> <a id="2943" class="Keyword">INLINE</a> <a id="2950" href="Function.Base.html#2853" class="Function">λ-</a> <a id="2953" class="Symbol">#-}</a>
|
||
|
||
<a id="2958" class="Comment">-- Case expressions (to be used with pattern-matching lambdas, see</a>
|
||
<a id="3025" class="Comment">-- README.Case).</a>
|
||
|
||
<a id="case_return_of_"></a><a id="3043" href="Function.Base.html#3043" class="Function Operator">case_return_of_</a> <a id="3059" class="Symbol">:</a> <a id="3061" class="Symbol">∀</a> <a id="3063" class="Symbol">{</a><a id="3064" href="Function.Base.html#3064" class="Bound">A</a> <a id="3066" class="Symbol">:</a> <a id="3068" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="3072" href="Function.Base.html#436" class="Generalizable">a</a><a id="3073" class="Symbol">}</a> <a id="3075" class="Symbol">(</a><a id="3076" href="Function.Base.html#3076" class="Bound">x</a> <a id="3078" class="Symbol">:</a> <a id="3080" href="Function.Base.html#3064" class="Bound">A</a><a id="3081" class="Symbol">)</a> <a id="3083" class="Symbol">(</a><a id="3084" href="Function.Base.html#3084" class="Bound">B</a> <a id="3086" class="Symbol">:</a> <a id="3088" href="Function.Base.html#3064" class="Bound">A</a> <a id="3090" class="Symbol">→</a> <a id="3092" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="3096" href="Function.Base.html#438" class="Generalizable">b</a><a id="3097" class="Symbol">)</a> <a id="3099" class="Symbol">→</a>
|
||
<a id="3119" class="Symbol">((</a><a id="3121" href="Function.Base.html#3121" class="Bound">x</a> <a id="3123" class="Symbol">:</a> <a id="3125" href="Function.Base.html#3064" class="Bound">A</a><a id="3126" class="Symbol">)</a> <a id="3128" class="Symbol">→</a> <a id="3130" href="Function.Base.html#3084" class="Bound">B</a> <a id="3132" href="Function.Base.html#3121" class="Bound">x</a><a id="3133" class="Symbol">)</a> <a id="3135" class="Symbol">→</a> <a id="3137" href="Function.Base.html#3084" class="Bound">B</a> <a id="3139" href="Function.Base.html#3076" class="Bound">x</a>
|
||
<a id="3141" href="Function.Base.html#3043" class="Function Operator">case</a> <a id="3146" href="Function.Base.html#3146" class="Bound">x</a> <a id="3148" href="Function.Base.html#3043" class="Function Operator">return</a> <a id="3155" href="Function.Base.html#3155" class="Bound">B</a> <a id="3157" href="Function.Base.html#3043" class="Function Operator">of</a> <a id="3160" href="Function.Base.html#3160" class="Bound">f</a> <a id="3162" class="Symbol">=</a> <a id="3164" href="Function.Base.html#3160" class="Bound">f</a> <a id="3166" href="Function.Base.html#3146" class="Bound">x</a>
|
||
<a id="3168" class="Symbol">{-#</a> <a id="3172" class="Keyword">INLINE</a> <a id="3179" href="Function.Base.html#3043" class="Function Operator">case_return_of_</a> <a id="3195" class="Symbol">#-}</a>
|
||
|
||
<a id="3200" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="3273" class="Comment">-- Non-dependent versions of dependent operations</a>
|
||
|
||
<a id="3324" class="Comment">-- Any of the above operations for dependent functions will also work</a>
|
||
<a id="3394" class="Comment">-- for non-dependent functions but sometimes Agda has difficulty</a>
|
||
<a id="3459" class="Comment">-- inferring the non-dependency. Primed (′ = \prime) versions of the</a>
|
||
<a id="3528" class="Comment">-- operations are therefore provided below that sometimes have better</a>
|
||
<a id="3598" class="Comment">-- inference properties.</a>
|
||
|
||
<a id="3624" class="Keyword">infixr</a> <a id="3631" class="Number">9</a> <a id="3633" href="Function.Base.html#3715" class="Function Operator">_∘′_</a> <a id="3638" href="Function.Base.html#3768" class="Function Operator">_∘₂′_</a>
|
||
<a id="3644" class="Keyword">infixl</a> <a id="3651" class="Number">0</a> <a id="3653" href="Function.Base.html#4007" class="Function Operator">_|>′_</a>
|
||
<a id="3659" class="Keyword">infix</a> <a id="3666" class="Number">0</a> <a id="3668" href="Function.Base.html#4130" class="Function Operator">case_of_</a>
|
||
<a id="3677" class="Keyword">infixr</a> <a id="3684" class="Number">-1</a> <a id="3687" href="Function.Base.html#3848" class="Function Operator">_$′_</a> <a id="3692" href="Function.Base.html#3924" class="Function Operator">_$!′_</a>
|
||
|
||
<a id="3699" class="Comment">-- Composition</a>
|
||
|
||
<a id="_∘′_"></a><a id="3715" href="Function.Base.html#3715" class="Function Operator">_∘′_</a> <a id="3720" class="Symbol">:</a> <a id="3722" class="Symbol">(</a><a id="3723" href="Function.Base.html#472" class="Generalizable">B</a> <a id="3725" class="Symbol">→</a> <a id="3727" href="Function.Base.html#486" class="Generalizable">C</a><a id="3728" class="Symbol">)</a> <a id="3730" class="Symbol">→</a> <a id="3732" class="Symbol">(</a><a id="3733" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3735" class="Symbol">→</a> <a id="3737" href="Function.Base.html#472" class="Generalizable">B</a><a id="3738" class="Symbol">)</a> <a id="3740" class="Symbol">→</a> <a id="3742" class="Symbol">(</a><a id="3743" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3745" class="Symbol">→</a> <a id="3747" href="Function.Base.html#486" class="Generalizable">C</a><a id="3748" class="Symbol">)</a>
|
||
<a id="3750" href="Function.Base.html#3750" class="Bound">f</a> <a id="3752" href="Function.Base.html#3715" class="Function Operator">∘′</a> <a id="3755" href="Function.Base.html#3755" class="Bound">g</a> <a id="3757" class="Symbol">=</a> <a id="3759" href="Function.Base.html#1040" class="Function Operator">_∘_</a> <a id="3763" href="Function.Base.html#3750" class="Bound">f</a> <a id="3765" href="Function.Base.html#3755" class="Bound">g</a>
|
||
|
||
<a id="_∘₂′_"></a><a id="3768" href="Function.Base.html#3768" class="Function Operator">_∘₂′_</a> <a id="3774" class="Symbol">:</a> <a id="3776" class="Symbol">(</a><a id="3777" href="Function.Base.html#486" class="Generalizable">C</a> <a id="3779" class="Symbol">→</a> <a id="3781" href="Function.Base.html#500" class="Generalizable">D</a><a id="3782" class="Symbol">)</a> <a id="3784" class="Symbol">→</a> <a id="3786" class="Symbol">(</a><a id="3787" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3789" class="Symbol">→</a> <a id="3791" href="Function.Base.html#472" class="Generalizable">B</a> <a id="3793" class="Symbol">→</a> <a id="3795" href="Function.Base.html#486" class="Generalizable">C</a><a id="3796" class="Symbol">)</a> <a id="3798" class="Symbol">→</a> <a id="3800" class="Symbol">(</a><a id="3801" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3803" class="Symbol">→</a> <a id="3805" href="Function.Base.html#472" class="Generalizable">B</a> <a id="3807" class="Symbol">→</a> <a id="3809" href="Function.Base.html#500" class="Generalizable">D</a><a id="3810" class="Symbol">)</a>
|
||
<a id="3812" href="Function.Base.html#3812" class="Bound">f</a> <a id="3814" href="Function.Base.html#3768" class="Function Operator">∘₂′</a> <a id="3818" href="Function.Base.html#3818" class="Bound">g</a> <a id="3820" class="Symbol">=</a> <a id="3822" href="Function.Base.html#1228" class="Function Operator">_∘₂_</a> <a id="3827" href="Function.Base.html#3812" class="Bound">f</a> <a id="3829" href="Function.Base.html#3818" class="Bound">g</a>
|
||
|
||
<a id="3832" class="Comment">-- Application</a>
|
||
|
||
<a id="_$′_"></a><a id="3848" href="Function.Base.html#3848" class="Function Operator">_$′_</a> <a id="3853" class="Symbol">:</a> <a id="3855" class="Symbol">(</a><a id="3856" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3858" class="Symbol">→</a> <a id="3860" href="Function.Base.html#472" class="Generalizable">B</a><a id="3861" class="Symbol">)</a> <a id="3863" class="Symbol">→</a> <a id="3865" class="Symbol">(</a><a id="3866" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3868" class="Symbol">→</a> <a id="3870" href="Function.Base.html#472" class="Generalizable">B</a><a id="3871" class="Symbol">)</a>
|
||
<a id="3873" href="Function.Base.html#3848" class="Function Operator">_$′_</a> <a id="3878" class="Symbol">=</a> <a id="3880" href="Function.Base.html#1928" class="Function Operator">_$_</a>
|
||
|
||
<a id="3885" class="Comment">-- Strict (call-by-value) application</a>
|
||
|
||
<a id="_$!′_"></a><a id="3924" href="Function.Base.html#3924" class="Function Operator">_$!′_</a> <a id="3930" class="Symbol">:</a> <a id="3932" class="Symbol">(</a><a id="3933" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3935" class="Symbol">→</a> <a id="3937" href="Function.Base.html#472" class="Generalizable">B</a><a id="3938" class="Symbol">)</a> <a id="3940" class="Symbol">→</a> <a id="3942" class="Symbol">(</a><a id="3943" href="Function.Base.html#458" class="Generalizable">A</a> <a id="3945" class="Symbol">→</a> <a id="3947" href="Function.Base.html#472" class="Generalizable">B</a><a id="3948" class="Symbol">)</a>
|
||
<a id="3950" href="Function.Base.html#3924" class="Function Operator">_$!′_</a> <a id="3956" class="Symbol">=</a> <a id="3958" href="Function.Base.html#2077" class="Function Operator">_$!_</a>
|
||
|
||
<a id="3964" class="Comment">-- Flipped application (aka pipe-forward)</a>
|
||
|
||
<a id="_|>′_"></a><a id="4007" href="Function.Base.html#4007" class="Function Operator">_|>′_</a> <a id="4013" class="Symbol">:</a> <a id="4015" href="Function.Base.html#458" class="Generalizable">A</a> <a id="4017" class="Symbol">→</a> <a id="4019" class="Symbol">(</a><a id="4020" href="Function.Base.html#458" class="Generalizable">A</a> <a id="4022" class="Symbol">→</a> <a id="4024" href="Function.Base.html#472" class="Generalizable">B</a><a id="4025" class="Symbol">)</a> <a id="4027" class="Symbol">→</a> <a id="4029" href="Function.Base.html#472" class="Generalizable">B</a>
|
||
<a id="4031" href="Function.Base.html#4007" class="Function Operator">_|>′_</a> <a id="4037" class="Symbol">=</a> <a id="4039" href="Function.Base.html#2219" class="Function Operator">_|>_</a>
|
||
|
||
<a id="4045" class="Comment">-- Case expressions (to be used with pattern-matching lambdas, see</a>
|
||
<a id="4112" class="Comment">-- README.Case).</a>
|
||
|
||
<a id="case_of_"></a><a id="4130" href="Function.Base.html#4130" class="Function Operator">case_of_</a> <a id="4139" class="Symbol">:</a> <a id="4141" href="Function.Base.html#458" class="Generalizable">A</a> <a id="4143" class="Symbol">→</a> <a id="4145" class="Symbol">(</a><a id="4146" href="Function.Base.html#458" class="Generalizable">A</a> <a id="4148" class="Symbol">→</a> <a id="4150" href="Function.Base.html#472" class="Generalizable">B</a><a id="4151" class="Symbol">)</a> <a id="4153" class="Symbol">→</a> <a id="4155" href="Function.Base.html#472" class="Generalizable">B</a>
|
||
<a id="4157" href="Function.Base.html#4130" class="Function Operator">case</a> <a id="4162" href="Function.Base.html#4162" class="Bound">x</a> <a id="4164" href="Function.Base.html#4130" class="Function Operator">of</a> <a id="4167" href="Function.Base.html#4167" class="Bound">f</a> <a id="4169" class="Symbol">=</a> <a id="4171" href="Function.Base.html#3043" class="Function Operator">case</a> <a id="4176" href="Function.Base.html#4162" class="Bound">x</a> <a id="4178" href="Function.Base.html#3043" class="Function Operator">return</a> <a id="4185" class="Symbol">_</a> <a id="4187" href="Function.Base.html#3043" class="Function Operator">of</a> <a id="4190" href="Function.Base.html#4167" class="Bound">f</a>
|
||
<a id="4192" class="Symbol">{-#</a> <a id="4196" class="Keyword">INLINE</a> <a id="4203" href="Function.Base.html#4130" class="Function Operator">case_of_</a> <a id="4212" class="Symbol">#-}</a>
|
||
|
||
<a id="4217" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="4290" class="Comment">-- Operations that are only defined for non-dependent functions</a>
|
||
|
||
<a id="4355" class="Keyword">infixl</a> <a id="4362" class="Number">1</a> <a id="4364" href="Function.Base.html#4407" class="Function Operator">_⟨_⟩_</a>
|
||
<a id="4370" class="Keyword">infixl</a> <a id="4377" class="Number">0</a> <a id="4379" href="Function.Base.html#4571" class="Function Operator">_∋_</a>
|
||
|
||
<a id="4384" class="Comment">-- Binary application</a>
|
||
|
||
<a id="_⟨_⟩_"></a><a id="4407" href="Function.Base.html#4407" class="Function Operator">_⟨_⟩_</a> <a id="4413" class="Symbol">:</a> <a id="4415" href="Function.Base.html#458" class="Generalizable">A</a> <a id="4417" class="Symbol">→</a> <a id="4419" class="Symbol">(</a><a id="4420" href="Function.Base.html#458" class="Generalizable">A</a> <a id="4422" class="Symbol">→</a> <a id="4424" href="Function.Base.html#472" class="Generalizable">B</a> <a id="4426" class="Symbol">→</a> <a id="4428" href="Function.Base.html#486" class="Generalizable">C</a><a id="4429" class="Symbol">)</a> <a id="4431" class="Symbol">→</a> <a id="4433" href="Function.Base.html#472" class="Generalizable">B</a> <a id="4435" class="Symbol">→</a> <a id="4437" href="Function.Base.html#486" class="Generalizable">C</a>
|
||
<a id="4439" href="Function.Base.html#4439" class="Bound">x</a> <a id="4441" href="Function.Base.html#4407" class="Function Operator">⟨</a> <a id="4443" href="Function.Base.html#4443" class="Bound">f</a> <a id="4445" href="Function.Base.html#4407" class="Function Operator">⟩</a> <a id="4447" href="Function.Base.html#4447" class="Bound">y</a> <a id="4449" class="Symbol">=</a> <a id="4451" href="Function.Base.html#4443" class="Bound">f</a> <a id="4453" href="Function.Base.html#4439" class="Bound">x</a> <a id="4455" href="Function.Base.html#4447" class="Bound">y</a>
|
||
|
||
<a id="4458" class="Comment">-- In Agda you cannot annotate every subexpression with a type</a>
|
||
<a id="4521" class="Comment">-- signature. This function can be used instead.</a>
|
||
|
||
<a id="_∋_"></a><a id="4571" href="Function.Base.html#4571" class="Function Operator">_∋_</a> <a id="4575" class="Symbol">:</a> <a id="4577" class="Symbol">(</a><a id="4578" href="Function.Base.html#4578" class="Bound">A</a> <a id="4580" class="Symbol">:</a> <a id="4582" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="4586" href="Function.Base.html#436" class="Generalizable">a</a><a id="4587" class="Symbol">)</a> <a id="4589" class="Symbol">→</a> <a id="4591" href="Function.Base.html#4578" class="Bound">A</a> <a id="4593" class="Symbol">→</a> <a id="4595" href="Function.Base.html#4578" class="Bound">A</a>
|
||
<a id="4597" href="Function.Base.html#4597" class="Bound">A</a> <a id="4599" href="Function.Base.html#4571" class="Function Operator">∋</a> <a id="4601" href="Function.Base.html#4601" class="Bound">x</a> <a id="4603" class="Symbol">=</a> <a id="4605" href="Function.Base.html#4601" class="Bound">x</a>
|
||
|
||
<a id="4608" class="Comment">-- Conversely it is sometimes useful to be able to extract the</a>
|
||
<a id="4671" class="Comment">-- type of a given expression.</a>
|
||
|
||
<a id="typeOf"></a><a id="4703" href="Function.Base.html#4703" class="Function">typeOf</a> <a id="4710" class="Symbol">:</a> <a id="4712" class="Symbol">{</a><a id="4713" href="Function.Base.html#4713" class="Bound">A</a> <a id="4715" class="Symbol">:</a> <a id="4717" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="4721" href="Function.Base.html#436" class="Generalizable">a</a><a id="4722" class="Symbol">}</a> <a id="4724" class="Symbol">→</a> <a id="4726" href="Function.Base.html#4713" class="Bound">A</a> <a id="4728" class="Symbol">→</a> <a id="4730" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="4734" href="Function.Base.html#436" class="Generalizable">a</a>
|
||
<a id="4736" href="Function.Base.html#4703" class="Function">typeOf</a> <a id="4743" class="Symbol">{</a><a id="4744" class="Argument">A</a> <a id="4746" class="Symbol">=</a> <a id="4748" href="Function.Base.html#4748" class="Bound">A</a><a id="4749" class="Symbol">}</a> <a id="4751" class="Symbol">_</a> <a id="4753" class="Symbol">=</a> <a id="4755" href="Function.Base.html#4748" class="Bound">A</a>
|
||
|
||
<a id="4758" class="Comment">-- Construct an element of the given type by instance search.</a>
|
||
|
||
<a id="it"></a><a id="4821" href="Function.Base.html#4821" class="Function">it</a> <a id="4824" class="Symbol">:</a> <a id="4826" class="Symbol">{</a><a id="4827" href="Function.Base.html#4827" class="Bound">A</a> <a id="4829" class="Symbol">:</a> <a id="4831" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="4835" href="Function.Base.html#436" class="Generalizable">a</a><a id="4836" class="Symbol">}</a> <a id="4838" class="Symbol">→</a> <a id="4840" class="Symbol">{{</a><a id="4842" href="Function.Base.html#4827" class="Bound">A</a><a id="4843" class="Symbol">}}</a> <a id="4846" class="Symbol">→</a> <a id="4848" href="Function.Base.html#4827" class="Bound">A</a>
|
||
<a id="4850" href="Function.Base.html#4821" class="Function">it</a> <a id="4853" class="Symbol">{{</a><a id="4855" href="Function.Base.html#4855" class="Bound">x</a><a id="4856" class="Symbol">}}</a> <a id="4859" class="Symbol">=</a> <a id="4861" href="Function.Base.html#4855" class="Bound">x</a>
|
||
|
||
<a id="4864" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="4937" class="Comment">-- Composition of a binary function with other functions</a>
|
||
|
||
<a id="4995" class="Keyword">infixr</a> <a id="5002" class="Number">0</a> <a id="5004" href="Function.Base.html#5124" class="Function Operator">_-⟪_⟫-_</a> <a id="5012" href="Function.Base.html#5898" class="Function Operator">_-⟨_⟫-_</a>
|
||
<a id="5020" class="Keyword">infixl</a> <a id="5027" class="Number">0</a> <a id="5029" href="Function.Base.html#5752" class="Function Operator">_-⟪_⟩-_</a>
|
||
<a id="5037" class="Keyword">infixr</a> <a id="5044" class="Number">1</a> <a id="5046" href="Function.Base.html#6024" class="Function Operator">_-⟨_⟩-_</a> <a id="5054" href="Function.Base.html#5391" class="Function Operator">∣_⟫-_</a> <a id="5060" href="Function.Base.html#5630" class="Function Operator">∣_⟩-_</a>
|
||
<a id="5066" class="Keyword">infixl</a> <a id="5073" class="Number">1</a> <a id="5075" href="Function.Base.html#6294" class="Function Operator">_on_</a> <a id="5080" href="Function.Base.html#6177" class="Function Operator">_on₂_</a> <a id="5086" href="Function.Base.html#5268" class="Function Operator">_-⟪_∣</a> <a id="5092" href="Function.Base.html#5511" class="Function Operator">_-⟨_∣</a>
|
||
|
||
<a id="5099" class="Comment">-- Two binary functions</a>
|
||
|
||
<a id="_-⟪_⟫-_"></a><a id="5124" href="Function.Base.html#5124" class="Function Operator">_-⟪_⟫-_</a> <a id="5132" class="Symbol">:</a> <a id="5134" class="Symbol">(</a><a id="5135" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5137" class="Symbol">→</a> <a id="5139" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5141" class="Symbol">→</a> <a id="5143" href="Function.Base.html#486" class="Generalizable">C</a><a id="5144" class="Symbol">)</a> <a id="5146" class="Symbol">→</a> <a id="5148" class="Symbol">(</a><a id="5149" href="Function.Base.html#486" class="Generalizable">C</a> <a id="5151" class="Symbol">→</a> <a id="5153" href="Function.Base.html#500" class="Generalizable">D</a> <a id="5155" class="Symbol">→</a> <a id="5157" href="Function.Base.html#514" class="Generalizable">E</a><a id="5158" class="Symbol">)</a> <a id="5160" class="Symbol">→</a> <a id="5162" class="Symbol">(</a><a id="5163" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5165" class="Symbol">→</a> <a id="5167" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5169" class="Symbol">→</a> <a id="5171" href="Function.Base.html#500" class="Generalizable">D</a><a id="5172" class="Symbol">)</a> <a id="5174" class="Symbol">→</a> <a id="5176" class="Symbol">(</a><a id="5177" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5179" class="Symbol">→</a> <a id="5181" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5183" class="Symbol">→</a> <a id="5185" href="Function.Base.html#514" class="Generalizable">E</a><a id="5186" class="Symbol">)</a>
|
||
<a id="5188" href="Function.Base.html#5188" class="Bound">f</a> <a id="5190" href="Function.Base.html#5124" class="Function Operator">-⟪</a> <a id="5193" href="Function.Base.html#5193" class="Bound Operator">_*_</a> <a id="5197" href="Function.Base.html#5124" class="Function Operator">⟫-</a> <a id="5200" href="Function.Base.html#5200" class="Bound">g</a> <a id="5202" class="Symbol">=</a> <a id="5204" class="Symbol">λ</a> <a id="5206" href="Function.Base.html#5206" class="Bound">x</a> <a id="5208" href="Function.Base.html#5208" class="Bound">y</a> <a id="5210" class="Symbol">→</a> <a id="5212" href="Function.Base.html#5188" class="Bound">f</a> <a id="5214" href="Function.Base.html#5206" class="Bound">x</a> <a id="5216" href="Function.Base.html#5208" class="Bound">y</a> <a id="5218" href="Function.Base.html#5193" class="Bound Operator">*</a> <a id="5220" href="Function.Base.html#5200" class="Bound">g</a> <a id="5222" href="Function.Base.html#5206" class="Bound">x</a> <a id="5224" href="Function.Base.html#5208" class="Bound">y</a>
|
||
|
||
<a id="5227" class="Comment">-- A single binary function on the left</a>
|
||
|
||
<a id="_-⟪_∣"></a><a id="5268" href="Function.Base.html#5268" class="Function Operator">_-⟪_∣</a> <a id="5274" class="Symbol">:</a> <a id="5276" class="Symbol">(</a><a id="5277" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5279" class="Symbol">→</a> <a id="5281" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5283" class="Symbol">→</a> <a id="5285" href="Function.Base.html#486" class="Generalizable">C</a><a id="5286" class="Symbol">)</a> <a id="5288" class="Symbol">→</a> <a id="5290" class="Symbol">(</a><a id="5291" href="Function.Base.html#486" class="Generalizable">C</a> <a id="5293" class="Symbol">→</a> <a id="5295" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5297" class="Symbol">→</a> <a id="5299" href="Function.Base.html#500" class="Generalizable">D</a><a id="5300" class="Symbol">)</a> <a id="5302" class="Symbol">→</a> <a id="5304" class="Symbol">(</a><a id="5305" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5307" class="Symbol">→</a> <a id="5309" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5311" class="Symbol">→</a> <a id="5313" href="Function.Base.html#500" class="Generalizable">D</a><a id="5314" class="Symbol">)</a>
|
||
<a id="5316" href="Function.Base.html#5316" class="Bound">f</a> <a id="5318" href="Function.Base.html#5268" class="Function Operator">-⟪</a> <a id="5321" href="Function.Base.html#5321" class="Bound Operator">_*_</a> <a id="5325" href="Function.Base.html#5268" class="Function Operator">∣</a> <a id="5327" class="Symbol">=</a> <a id="5329" href="Function.Base.html#5316" class="Bound">f</a> <a id="5331" href="Function.Base.html#5124" class="Function Operator">-⟪</a> <a id="5334" href="Function.Base.html#5321" class="Bound Operator">_*_</a> <a id="5338" href="Function.Base.html#5124" class="Function Operator">⟫-</a> <a id="5341" href="Function.Base.html#682" class="Function">constᵣ</a>
|
||
|
||
<a id="5349" class="Comment">-- A single binary function on the right</a>
|
||
|
||
<a id="∣_⟫-_"></a><a id="5391" href="Function.Base.html#5391" class="Function Operator">∣_⟫-_</a> <a id="5397" class="Symbol">:</a> <a id="5399" class="Symbol">(</a><a id="5400" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5402" class="Symbol">→</a> <a id="5404" href="Function.Base.html#486" class="Generalizable">C</a> <a id="5406" class="Symbol">→</a> <a id="5408" href="Function.Base.html#500" class="Generalizable">D</a><a id="5409" class="Symbol">)</a> <a id="5411" class="Symbol">→</a> <a id="5413" class="Symbol">(</a><a id="5414" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5416" class="Symbol">→</a> <a id="5418" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5420" class="Symbol">→</a> <a id="5422" href="Function.Base.html#486" class="Generalizable">C</a><a id="5423" class="Symbol">)</a> <a id="5425" class="Symbol">→</a> <a id="5427" class="Symbol">(</a><a id="5428" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5430" class="Symbol">→</a> <a id="5432" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5434" class="Symbol">→</a> <a id="5436" href="Function.Base.html#500" class="Generalizable">D</a><a id="5437" class="Symbol">)</a>
|
||
<a id="5439" href="Function.Base.html#5391" class="Function Operator">∣</a> <a id="5441" href="Function.Base.html#5441" class="Bound Operator">_*_</a> <a id="5445" href="Function.Base.html#5391" class="Function Operator">⟫-</a> <a id="5448" href="Function.Base.html#5448" class="Bound">g</a> <a id="5450" class="Symbol">=</a> <a id="5452" href="Function.Base.html#645" class="Function">const</a> <a id="5458" href="Function.Base.html#5124" class="Function Operator">-⟪</a> <a id="5461" href="Function.Base.html#5441" class="Bound Operator">_*_</a> <a id="5465" href="Function.Base.html#5124" class="Function Operator">⟫-</a> <a id="5468" href="Function.Base.html#5448" class="Bound">g</a>
|
||
|
||
<a id="5471" class="Comment">-- A single unary function on the left</a>
|
||
|
||
<a id="_-⟨_∣"></a><a id="5511" href="Function.Base.html#5511" class="Function Operator">_-⟨_∣</a> <a id="5517" class="Symbol">:</a> <a id="5519" class="Symbol">(</a><a id="5520" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5522" class="Symbol">→</a> <a id="5524" href="Function.Base.html#486" class="Generalizable">C</a><a id="5525" class="Symbol">)</a> <a id="5527" class="Symbol">→</a> <a id="5529" class="Symbol">(</a><a id="5530" href="Function.Base.html#486" class="Generalizable">C</a> <a id="5532" class="Symbol">→</a> <a id="5534" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5536" class="Symbol">→</a> <a id="5538" href="Function.Base.html#500" class="Generalizable">D</a><a id="5539" class="Symbol">)</a> <a id="5541" class="Symbol">→</a> <a id="5543" class="Symbol">(</a><a id="5544" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5546" class="Symbol">→</a> <a id="5548" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5550" class="Symbol">→</a> <a id="5552" href="Function.Base.html#500" class="Generalizable">D</a><a id="5553" class="Symbol">)</a>
|
||
<a id="5555" href="Function.Base.html#5555" class="Bound">f</a> <a id="5557" href="Function.Base.html#5511" class="Function Operator">-⟨</a> <a id="5560" href="Function.Base.html#5560" class="Bound Operator">_*_</a> <a id="5564" href="Function.Base.html#5511" class="Function Operator">∣</a> <a id="5566" class="Symbol">=</a> <a id="5568" href="Function.Base.html#5555" class="Bound">f</a> <a id="5570" href="Function.Base.html#1228" class="Function Operator">∘₂</a> <a id="5573" href="Function.Base.html#645" class="Function">const</a> <a id="5579" href="Function.Base.html#5268" class="Function Operator">-⟪</a> <a id="5582" href="Function.Base.html#5560" class="Bound Operator">_*_</a> <a id="5586" href="Function.Base.html#5268" class="Function Operator">∣</a>
|
||
|
||
<a id="5589" class="Comment">-- A single unary function on the right</a>
|
||
|
||
<a id="∣_⟩-_"></a><a id="5630" href="Function.Base.html#5630" class="Function Operator">∣_⟩-_</a> <a id="5636" class="Symbol">:</a> <a id="5638" class="Symbol">(</a><a id="5639" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5641" class="Symbol">→</a> <a id="5643" href="Function.Base.html#486" class="Generalizable">C</a> <a id="5645" class="Symbol">→</a> <a id="5647" href="Function.Base.html#500" class="Generalizable">D</a><a id="5648" class="Symbol">)</a> <a id="5650" class="Symbol">→</a> <a id="5652" class="Symbol">(</a><a id="5653" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5655" class="Symbol">→</a> <a id="5657" href="Function.Base.html#486" class="Generalizable">C</a><a id="5658" class="Symbol">)</a> <a id="5660" class="Symbol">→</a> <a id="5662" class="Symbol">(</a><a id="5663" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5665" class="Symbol">→</a> <a id="5667" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5669" class="Symbol">→</a> <a id="5671" href="Function.Base.html#500" class="Generalizable">D</a><a id="5672" class="Symbol">)</a>
|
||
<a id="5674" href="Function.Base.html#5630" class="Function Operator">∣</a> <a id="5676" href="Function.Base.html#5676" class="Bound Operator">_*_</a> <a id="5680" href="Function.Base.html#5630" class="Function Operator">⟩-</a> <a id="5683" href="Function.Base.html#5683" class="Bound">g</a> <a id="5685" class="Symbol">=</a> <a id="5687" href="Function.Base.html#5391" class="Function Operator">∣</a> <a id="5689" href="Function.Base.html#5676" class="Bound Operator">_*_</a> <a id="5693" href="Function.Base.html#5391" class="Function Operator">⟫-</a> <a id="5696" href="Function.Base.html#5683" class="Bound">g</a> <a id="5698" href="Function.Base.html#1228" class="Function Operator">∘₂</a> <a id="5701" href="Function.Base.html#682" class="Function">constᵣ</a>
|
||
|
||
<a id="5709" class="Comment">-- A binary function and a unary function</a>
|
||
|
||
<a id="_-⟪_⟩-_"></a><a id="5752" href="Function.Base.html#5752" class="Function Operator">_-⟪_⟩-_</a> <a id="5760" class="Symbol">:</a> <a id="5762" class="Symbol">(</a><a id="5763" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5765" class="Symbol">→</a> <a id="5767" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5769" class="Symbol">→</a> <a id="5771" href="Function.Base.html#486" class="Generalizable">C</a><a id="5772" class="Symbol">)</a> <a id="5774" class="Symbol">→</a> <a id="5776" class="Symbol">(</a><a id="5777" href="Function.Base.html#486" class="Generalizable">C</a> <a id="5779" class="Symbol">→</a> <a id="5781" href="Function.Base.html#500" class="Generalizable">D</a> <a id="5783" class="Symbol">→</a> <a id="5785" href="Function.Base.html#514" class="Generalizable">E</a><a id="5786" class="Symbol">)</a> <a id="5788" class="Symbol">→</a> <a id="5790" class="Symbol">(</a><a id="5791" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5793" class="Symbol">→</a> <a id="5795" href="Function.Base.html#500" class="Generalizable">D</a><a id="5796" class="Symbol">)</a> <a id="5798" class="Symbol">→</a> <a id="5800" class="Symbol">(</a><a id="5801" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5803" class="Symbol">→</a> <a id="5805" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5807" class="Symbol">→</a> <a id="5809" href="Function.Base.html#514" class="Generalizable">E</a><a id="5810" class="Symbol">)</a>
|
||
<a id="5812" href="Function.Base.html#5812" class="Bound">f</a> <a id="5814" href="Function.Base.html#5752" class="Function Operator">-⟪</a> <a id="5817" href="Function.Base.html#5817" class="Bound Operator">_*_</a> <a id="5821" href="Function.Base.html#5752" class="Function Operator">⟩-</a> <a id="5824" href="Function.Base.html#5824" class="Bound">g</a> <a id="5826" class="Symbol">=</a> <a id="5828" href="Function.Base.html#5812" class="Bound">f</a> <a id="5830" href="Function.Base.html#5124" class="Function Operator">-⟪</a> <a id="5833" href="Function.Base.html#5817" class="Bound Operator">_*_</a> <a id="5837" href="Function.Base.html#5124" class="Function Operator">⟫-</a> <a id="5840" href="Function.Base.html#5630" class="Function Operator">∣</a> <a id="5842" href="Function.Base.html#682" class="Function">constᵣ</a> <a id="5849" href="Function.Base.html#5630" class="Function Operator">⟩-</a> <a id="5852" href="Function.Base.html#5824" class="Bound">g</a>
|
||
|
||
<a id="5855" class="Comment">-- A unary function and a binary function</a>
|
||
|
||
<a id="_-⟨_⟫-_"></a><a id="5898" href="Function.Base.html#5898" class="Function Operator">_-⟨_⟫-_</a> <a id="5906" class="Symbol">:</a> <a id="5908" class="Symbol">(</a><a id="5909" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5911" class="Symbol">→</a> <a id="5913" href="Function.Base.html#486" class="Generalizable">C</a><a id="5914" class="Symbol">)</a> <a id="5916" class="Symbol">→</a> <a id="5918" class="Symbol">(</a><a id="5919" href="Function.Base.html#486" class="Generalizable">C</a> <a id="5921" class="Symbol">→</a> <a id="5923" href="Function.Base.html#500" class="Generalizable">D</a> <a id="5925" class="Symbol">→</a> <a id="5927" href="Function.Base.html#514" class="Generalizable">E</a><a id="5928" class="Symbol">)</a> <a id="5930" class="Symbol">→</a> <a id="5932" class="Symbol">(</a><a id="5933" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5935" class="Symbol">→</a> <a id="5937" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5939" class="Symbol">→</a> <a id="5941" href="Function.Base.html#500" class="Generalizable">D</a><a id="5942" class="Symbol">)</a> <a id="5944" class="Symbol">→</a> <a id="5946" class="Symbol">(</a><a id="5947" href="Function.Base.html#458" class="Generalizable">A</a> <a id="5949" class="Symbol">→</a> <a id="5951" href="Function.Base.html#472" class="Generalizable">B</a> <a id="5953" class="Symbol">→</a> <a id="5955" href="Function.Base.html#514" class="Generalizable">E</a><a id="5956" class="Symbol">)</a>
|
||
<a id="5958" href="Function.Base.html#5958" class="Bound">f</a> <a id="5960" href="Function.Base.html#5898" class="Function Operator">-⟨</a> <a id="5963" href="Function.Base.html#5963" class="Bound Operator">_*_</a> <a id="5967" href="Function.Base.html#5898" class="Function Operator">⟫-</a> <a id="5970" href="Function.Base.html#5970" class="Bound">g</a> <a id="5972" class="Symbol">=</a> <a id="5974" href="Function.Base.html#5958" class="Bound">f</a> <a id="5976" href="Function.Base.html#5511" class="Function Operator">-⟨</a> <a id="5979" href="Function.Base.html#645" class="Function">const</a> <a id="5985" href="Function.Base.html#5511" class="Function Operator">∣</a> <a id="5987" href="Function.Base.html#5124" class="Function Operator">-⟪</a> <a id="5990" href="Function.Base.html#5963" class="Bound Operator">_*_</a> <a id="5994" href="Function.Base.html#5124" class="Function Operator">⟫-</a> <a id="5997" href="Function.Base.html#5970" class="Bound">g</a>
|
||
|
||
<a id="6000" class="Comment">-- Two unary functions</a>
|
||
|
||
<a id="_-⟨_⟩-_"></a><a id="6024" href="Function.Base.html#6024" class="Function Operator">_-⟨_⟩-_</a> <a id="6032" class="Symbol">:</a> <a id="6034" class="Symbol">(</a><a id="6035" href="Function.Base.html#458" class="Generalizable">A</a> <a id="6037" class="Symbol">→</a> <a id="6039" href="Function.Base.html#486" class="Generalizable">C</a><a id="6040" class="Symbol">)</a> <a id="6042" class="Symbol">→</a> <a id="6044" class="Symbol">(</a><a id="6045" href="Function.Base.html#486" class="Generalizable">C</a> <a id="6047" class="Symbol">→</a> <a id="6049" href="Function.Base.html#500" class="Generalizable">D</a> <a id="6051" class="Symbol">→</a> <a id="6053" href="Function.Base.html#514" class="Generalizable">E</a><a id="6054" class="Symbol">)</a> <a id="6056" class="Symbol">→</a> <a id="6058" class="Symbol">(</a><a id="6059" href="Function.Base.html#472" class="Generalizable">B</a> <a id="6061" class="Symbol">→</a> <a id="6063" href="Function.Base.html#500" class="Generalizable">D</a><a id="6064" class="Symbol">)</a> <a id="6066" class="Symbol">→</a> <a id="6068" class="Symbol">(</a><a id="6069" href="Function.Base.html#458" class="Generalizable">A</a> <a id="6071" class="Symbol">→</a> <a id="6073" href="Function.Base.html#472" class="Generalizable">B</a> <a id="6075" class="Symbol">→</a> <a id="6077" href="Function.Base.html#514" class="Generalizable">E</a><a id="6078" class="Symbol">)</a>
|
||
<a id="6080" href="Function.Base.html#6080" class="Bound">f</a> <a id="6082" href="Function.Base.html#6024" class="Function Operator">-⟨</a> <a id="6085" href="Function.Base.html#6085" class="Bound Operator">_*_</a> <a id="6089" href="Function.Base.html#6024" class="Function Operator">⟩-</a> <a id="6092" href="Function.Base.html#6092" class="Bound">g</a> <a id="6094" class="Symbol">=</a> <a id="6096" href="Function.Base.html#6080" class="Bound">f</a> <a id="6098" href="Function.Base.html#5511" class="Function Operator">-⟨</a> <a id="6101" href="Function.Base.html#645" class="Function">const</a> <a id="6107" href="Function.Base.html#5511" class="Function Operator">∣</a> <a id="6109" href="Function.Base.html#5124" class="Function Operator">-⟪</a> <a id="6112" href="Function.Base.html#6085" class="Bound Operator">_*_</a> <a id="6116" href="Function.Base.html#5124" class="Function Operator">⟫-</a> <a id="6119" href="Function.Base.html#5630" class="Function Operator">∣</a> <a id="6121" href="Function.Base.html#682" class="Function">constᵣ</a> <a id="6128" href="Function.Base.html#5630" class="Function Operator">⟩-</a> <a id="6131" href="Function.Base.html#6092" class="Bound">g</a>
|
||
|
||
<a id="6134" class="Comment">-- A single binary function on both sides</a>
|
||
|
||
<a id="_on₂_"></a><a id="6177" href="Function.Base.html#6177" class="Function Operator">_on₂_</a> <a id="6183" class="Symbol">:</a> <a id="6185" class="Symbol">(</a><a id="6186" href="Function.Base.html#486" class="Generalizable">C</a> <a id="6188" class="Symbol">→</a> <a id="6190" href="Function.Base.html#486" class="Generalizable">C</a> <a id="6192" class="Symbol">→</a> <a id="6194" href="Function.Base.html#500" class="Generalizable">D</a><a id="6195" class="Symbol">)</a> <a id="6197" class="Symbol">→</a> <a id="6199" class="Symbol">(</a><a id="6200" href="Function.Base.html#458" class="Generalizable">A</a> <a id="6202" class="Symbol">→</a> <a id="6204" href="Function.Base.html#472" class="Generalizable">B</a> <a id="6206" class="Symbol">→</a> <a id="6208" href="Function.Base.html#486" class="Generalizable">C</a><a id="6209" class="Symbol">)</a> <a id="6211" class="Symbol">→</a> <a id="6213" class="Symbol">(</a><a id="6214" href="Function.Base.html#458" class="Generalizable">A</a> <a id="6216" class="Symbol">→</a> <a id="6218" href="Function.Base.html#472" class="Generalizable">B</a> <a id="6220" class="Symbol">→</a> <a id="6222" href="Function.Base.html#500" class="Generalizable">D</a><a id="6223" class="Symbol">)</a>
|
||
<a id="6225" href="Function.Base.html#6225" class="Bound Operator">_*_</a> <a id="6229" href="Function.Base.html#6177" class="Function Operator">on₂</a> <a id="6233" href="Function.Base.html#6233" class="Bound">f</a> <a id="6235" class="Symbol">=</a> <a id="6237" href="Function.Base.html#6233" class="Bound">f</a> <a id="6239" href="Function.Base.html#5124" class="Function Operator">-⟪</a> <a id="6242" href="Function.Base.html#6225" class="Bound Operator">_*_</a> <a id="6246" href="Function.Base.html#5124" class="Function Operator">⟫-</a> <a id="6249" href="Function.Base.html#6233" class="Bound">f</a>
|
||
|
||
<a id="6252" class="Comment">-- A single unary function on both sides</a>
|
||
|
||
<a id="_on_"></a><a id="6294" href="Function.Base.html#6294" class="Function Operator">_on_</a> <a id="6299" class="Symbol">:</a> <a id="6301" class="Symbol">(</a><a id="6302" href="Function.Base.html#472" class="Generalizable">B</a> <a id="6304" class="Symbol">→</a> <a id="6306" href="Function.Base.html#472" class="Generalizable">B</a> <a id="6308" class="Symbol">→</a> <a id="6310" href="Function.Base.html#486" class="Generalizable">C</a><a id="6311" class="Symbol">)</a> <a id="6313" class="Symbol">→</a> <a id="6315" class="Symbol">(</a><a id="6316" href="Function.Base.html#458" class="Generalizable">A</a> <a id="6318" class="Symbol">→</a> <a id="6320" href="Function.Base.html#472" class="Generalizable">B</a><a id="6321" class="Symbol">)</a> <a id="6323" class="Symbol">→</a> <a id="6325" class="Symbol">(</a><a id="6326" href="Function.Base.html#458" class="Generalizable">A</a> <a id="6328" class="Symbol">→</a> <a id="6330" href="Function.Base.html#458" class="Generalizable">A</a> <a id="6332" class="Symbol">→</a> <a id="6334" href="Function.Base.html#486" class="Generalizable">C</a><a id="6335" class="Symbol">)</a>
|
||
<a id="6337" href="Function.Base.html#6337" class="Bound Operator">_*_</a> <a id="6341" href="Function.Base.html#6294" class="Function Operator">on</a> <a id="6344" href="Function.Base.html#6344" class="Bound">f</a> <a id="6346" class="Symbol">=</a> <a id="6348" href="Function.Base.html#6344" class="Bound">f</a> <a id="6350" href="Function.Base.html#6024" class="Function Operator">-⟨</a> <a id="6353" href="Function.Base.html#6337" class="Bound Operator">_*_</a> <a id="6357" href="Function.Base.html#6024" class="Function Operator">⟩-</a> <a id="6360" href="Function.Base.html#6344" class="Bound">f</a>
|
||
|
||
<a id="_-[_]-_"></a><a id="6363" href="Function.Base.html#6363" class="Function Operator">_-[_]-_</a> <a id="6371" class="Symbol">=</a> <a id="6373" href="Function.Base.html#5124" class="Function Operator">_-⟪_⟫-_</a>
|
||
<a id="6381" class="Symbol">{-#</a> <a id="6385" class="Keyword">WARNING_ON_USAGE</a> <a id="6402" class="Pragma">_-[_]-_</a>
|
||
<a id="6410" class="String">"Warning: Function._-[_]-_ was deprecated in v1.4.
|
||
Please use _-⟪_⟫-_ instead."</a>
|
||
<a id="6490" class="Symbol">#-}</a>
|
||
</pre></body></html> |