Factorial: Difference between revisions
Content added Content deleted
imported>Tromp (fac in BLC) |
(Add bruijn) |
||
Line 2,453: | Line 2,453: | ||
true? x == 0 1 { x * factorial(x - 1)} |
true? x == 0 1 { x * factorial(x - 1)} |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
=={{header|Bruijn}}== |
|||
Implementation for numbers encoded in balanced ternary using Mixfix syntax defined in the Math module: |
|||
<syntaxhighlight lang="bruijn"> |
|||
:import std/Math . |
|||
factorial [∏ (+1) → 0 | [0]] |
|||
:test ((factorial (+10)) =? (+3628800)) ([[1]]) |
|||
</syntaxhighlight> |
|||
=={{header|Burlesque}}== |
=={{header|Burlesque}}== |