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.
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