Created
July 23, 2016 17:49
-
-
Save nicolaspayette/c261b21f783f1d21a278b5e5ac70fd08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to-report max-one-of-list [ the-list reporter-task ] | |
let results map reporter-task the-list | |
let highest max results | |
let indices n-values length the-list [ ? ] | |
let indices-with-highest filter [ item ? results = highest ] indices | |
report item (one-of indices-with-highest) the-list | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment