Changeset 638 for abuse/trunk/src/lisp/lisp.cpp
- Timestamp:
- May 11, 2011, 1:13:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/lisp/lisp.cpp
r637 r638 846 846 } 847 847 848 LObject *LObject::Assoc(LObject *item) 849 { 850 if (item_type(this) != L_CONS_CELL) 851 return NULL; 852 853 LObject *list = this; 854 while (list) 848 LList *LList::Assoc(LObject *item) 849 { 850 LList *list = this; 851 while (list && item_type(list) == L_CONS_CELL 852 && item_type(CAR(list)) == L_CONS_CELL) 855 853 { 856 854 if (lisp_eq(CAR(CAR(list)), item)) 857 return lcar(list);858 list = CDR(list);855 return (LList *)CAR(list); 856 list = (LList *)CDR(list); 859 857 } 860 858
Note: See TracChangeset
for help on using the changeset viewer.