Title: Checking unique list in a patchset
Tags: netlogo
Question: I have each patch containing a list of length 4. For exaample
state = [ 1 0 1 4 ]
I want to check how many patches have such unique lists, given the order of elements in the list matters.
Thus, for example in each of 4 patches with the following:
[1 2 4 1] [ 1 2 2 3] [1 3 2 2] [1 2 4 1]
The output should be 3.
Comment: I don't understand either. I have the same questions as Seth.

Comment: I don't understand the question. _Why_ is the answer 4? What does "how many patches have such unique lists" mean?

Comment: Oh really sorry. It should be three.

Here is the accepted answer: This will do it:
length remove-duplicates [state] of patches
Comment for this answer: Great! This is amazing. I never thought of it this way. Thanks!


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:05/11/15', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<netlogo>', 'Title': 'Checking unique list in a patchset', 'ViewCount': 54, 'id': 30166858, 'user_AboutMe': '<pre><code> "The purpose of computing is insight, not numbers."- Richard Hamming, 1961\n</code></pre>\n\n<p>Abhishek has had a unique interdisciplinary research exposure to AI systems. His projects range from designing artificially intelligent autonomous systems that operate in varied setups, all the way to studying common emergent phenomena in natural systems. He has published 5 research papers in the field of complex systems, artificial intelligence and statistical inference. He is currently working on Deep Reinforcement Learning applications for Natural Language Processing and General-game Playing. He is also enthusiastic about open-source tools and frequently contributes to many open-source projects.</p>\n', 'user_AccountId': 4482792.0, 'user_DisplayName': 'Abhishek Bhatia', 'user_Reputation': 8868.0, 'user_Views': 1458.0, 'user_id': 3646408.0}}