A collection of lisp snippets I’ll be adding to as I learn more. Factorial (recursive function) (defun factorial (n) (if (= n 0) 1 (if (> n 0) (* n (factorial (- n 1))))))
Categories
Archives
Blogroll
RSS Links
A collection of lisp snippets I’ll be adding to as I learn more. Factorial (recursive function) (defun factorial (n) (if (= n 0) 1 (if (> n 0) (* n (factorial (- n 1))))))
In this tutorial we’ll look at some simple matrix multiplication tools in Python. The arrays are constructed using lists within lists, and the multiplication itself is implemented using for loops. The program works well for small arrays, but really starts bogging down at sizes 500×500 and above. Anyone doing serious work will want to check [...]