18 lines
1.1 KiB
Plaintext
18 lines
1.1 KiB
Plaintext
---
|
|
Test
|
|
---
|
|
Test recursion capabilities of various functions.
|
|
|
|
| script | lisp interpreter fixture |
|
|
| show | evaluate text | (load "lisp/random/list-builder.lisp") |
|
|
| check | evaluate text | (setq big-list (list-doubler '(1 1 1 1 1 1 1 1) 11)) | =~/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 |
|