RICO Algorithm coded in LISP