Zero to the zero power: Difference between revisions
PascalABC.NET
imported>Tromp |
(PascalABC.NET) |
||
(One intermediate revision by one other user not shown) | |||
Line 260:
In lambda calculus, <code>\n. n n</code> is a function mapping a Church numeral n to the Church numeral n^n. The following BLC program computes this for n=0 by using its empty input as a Church numeral (since nil coincides with Church numeral 0), and outputting in unary (i.e as a string of 0^0 1s), as generated from https://github.com/tromp/AIT/blob/master/rosetta/exp00.lam :
<
Output:
<pre>1</pre>
<syntaxhighlight>1</syntaxhighlight>▼
=={{header|BQN}}==
Line 1,143:
;output:
<pre>0.0 ^ 0 :1.00 0.0 ^ 0.0 :1.00</pre>
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="delphi">
##
print(0 ** 0)
{{out}}
<pre>1</pre>
=={{header|Perl}}==
|