locateobj.lisp

locateobj.lisp - result )) ) ) ) ( locateobj ' y '( a b c d...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
A:\UMN\AI\locateobj.lisp Wednesday, November 02, 2011 9:18 AM ; Balaji, FNU ; Student ID: 4287938 ; Extra Credit Assignment 3 ( defun locateobj ( obj l ) ( if ( null l ) nil ( loop for i from 1 to ( length l ) for x in l if ( eql x obj ) collect ( list x i ) if ( eql x obj ) collect x into result finally ( print ( length
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: result )) ) ) ) ( locateobj ' y '( a b c d e )) ( locateobj ' y '( x y z 1 2 3 )) ( locateobj ' y '( x y z a y b )) ( locateobj ' y '( x y z y u i y q y t a s d f y y y y y y z d y l y x y y y y )) ( locateobj ' y '( ))-1-...
View Full Document

Ask a homework question - tutors are online