Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!stanford.edu!neon.Stanford.EDU!michaelg From: michaelg@neon.Stanford.EDU (Michael Greenwald) Newsgroups: comp.lang.lisp Subject: Re: zeta lisp Message-ID: <1991Apr9.202309.23949@neon.Stanford.EDU> Date: 9 Apr 91 20:23:09 GMT References: <1991Apr09.110422.19604@kub.nl> Organization: Computer Science Department, Stanford University, Ca , USA Lines: 37 pberck@kub.nl (Peter Berck) writes: >I know it's a long shot, but does anyone know what this does: >(........ > (AND (STRING-EQUAL (STRING-CADR L) "j") > (zl:MEM #'STRING-EQUAL > (STRING-CAR (STRING-LAST MEM)) '("e" "a" "o")))))) >I am 'translating' a program written in ZetaLisp for someone, and I am >not sure what (zl:MEM ... ..) does, because I don't have the zl >package. He is away for a week, so I can't ask him, ... so I am trying >it this way. (ZL:MEM pred item list) is just like ZL:MEMQ, except that it uses the two argument pred for comparison instead of EQ. (Or you could say that it is just like MEMBER, except it takes a predicate instead of EQL). By the way, MEMQ is from MACLISP, so it isn't such a "long shot". Anyway, MEM returns NIL if "item" isn't in "list" according to "pred". If item >is< in the list, then MEM returns the first CONS with something matching item as its CAR (or, as they say, "the SUBLIST starting with ITEM") If ZL:MEM shows up someplace else, and has a non-commutative pred (like #'char-lessp), then you should know "item" is always the first argument passed to pred. >it looks like some sort of mapping function (?). MEM is (also) a >variable defined in the DO loop where this happens... >thanks for any help >-peter >-------------------------------------- >pberck@kub.nl - kubvx1::berckp