transcendental-lisp/fitnesse/FitNesseRoot/TranscendentalLisp/Recursion.wiki

18 lines
1.2 KiB
Plaintext

---
Test
---
Test recursion capabilities of various functions.
| script | lisp interpreter fixture |
| show | evaluate text | (load "lisp/random/big-list.lisp") |
| show | evaluate text | (load "lisp/random/list-builder.lisp") |
| check | evaluate text | big-list | =~/1\)$/ |
| check | evaluate text | (length big-list) | 16384 |
| check | evaluate text | (length (apply 'list big-list)) | 16384 |
| check | evaluate text | (apply '/ big-list) | 1 |
| check | evaluate text | (apply '* big-list) | 1 |
| check | evaluate text | (apply '+ big-list) | 16384 |
| check | evaluate text | (apply '- big-list) | -16382 |
| check | evaluate text | (apply '= big-list) | T |
| check | evaluate text | (apply '> (decreasing-list 0 10000)) | T |
| check | evaluate text | (apply '< (increasing-list 10000 10000)) | T |