User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
algorithm:factorial_iterative [2014/07/05 22:36]
will
algorithm:factorial_iterative [2015/02/02 08:28] (current)
Line 1: Line 1:
-====== Factorial - Iterative ​====== +======= λ Factorial - iterative ​======
-[algorithm factorial iterative]+
  
-====== Algorithm ======+<​nowiki>​ 
 +======= Algorithm ​=======
 <syntax js> <syntax js>
 function fac(x) { function fac(x) {
Line 13: Line 13:
 </​syntax>​ </​syntax>​
  
-====== Support ======+======= Support ​=======
 <syntax js> <syntax js>
 function run() { function run() {
Line 20: Line 20:
 </​syntax>​ </​syntax>​
  
-====== Options ======+======= Tests ======= 
 +<syntax js> 
 +function testTen() { 
 +    assert (fac(10) === 3628800, "​fac(10)"​);​ 
 +
 + 
 +function testSeven() { 
 +    assert (fac(7) === 5040 , "​fac(7)"​);​ 
 +}</​syntax>​ 
 + 
 +======= Options ​=======
 <syntax js> <syntax js>
 { {
 +    "​title":"​Factorial - iterative",​
     "​height":"​150px"​     "​height":"​150px"​
 } }
 </​syntax>​ </​syntax>​
  
-====== Visualisation ======+======= Visualisation ​=======
 <syntax html> <syntax html>
 <​html>​ <​html>​
Line 55: Line 66:
 </​html>​ </​html>​
 </​syntax>​ </​syntax>​
 +</​nowiki>​
algorithm/factorial_iterative.1404624960.txt.gz · Last modified: 2015/02/02 08:23 (external edit)