David, That's exactly right. (Pending a review of "The Reasoned Schemer" when I get home)
Jim On Nov 6, 11:18 am, David Nolen <dnolen.li...@gmail.com> wrote: > On Sat, Nov 6, 2010 at 5:02 AM, Sunil S Nandihalli < > > sunil.nandiha...@gmail.com> wrote: > > after looking through his source code ... I discovered that replacing > > cond-u with cond-a gives me the expected output .. but I am unable to > > explain what I have found... > > Regards, > > Sunil. > > mem-o is the the logical version of mem which returns the remainder of the > list from the first occurence of some atom: > > (mem 'apple '(orange pineapple apple strawberry)) -> '(apple strawberry) > > member-o is the logical version of member? which tests whether an atom > occurs at least once in a list: > > (member? 'apple '(orange pineapple apple strawberry)) -> #t > > I believe that: if a cond-a goal succeeds the remaining goals are ignored. > cond-u is like cond-a but a goal can succeed only once. From what I > understand these are analogous to cuts in Prolog. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en