Hi, There is a 'gotcha' in this one. Try 'show compare [a a c] [a b c]' This happens because you are only removing the item from the first list. See my response to this query. regards paspal wrote: > > Hi, > Here is my solution for permutated lists: > > ;---------------------------------- > to comp :list1 :list2 > if emptyp :list1 [op "true] > ifelse memberp (first :list1) :list2 ~ > [op comp butfirst :list1 :list2] ~ > [op "false] > end > > to compare :list1 :list2 > ifelse equalp (count :list1) (count :list2) ~ > [op comp :list1 :list2] ~ > [op "false] > end > ;------------------------------------ > try this: > show compare [a b c] [b a c] > and then > show compar [a [b] c] [[b] a c] > > Paspal > paspal@mail.bielnet.it > > --------------------------------------------------------------- > Please post messages to the Logo forum to logo-l@gsn.org. Mail > questions about the list administration to logofdn@gsn.org. To > unsubscribe send unsubscribe logo-l to majordomo@gsn.org. -- Frank Caggiano caggiano@atlantic.net http://www.atlantic.net/~caggiano --------------------------------------------------------------- Please post messages to the Logo forum to logo-l@gsn.org. Mail questions about the list administration to logofdn@gsn.org. To unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home