Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static function findSequence(list:Array<SymbolInfoItem>, sequence:CsList<Int>):CsList<Int> {
- var sequinceIds = sequence.toArray().join("");
- for (i in 0...list.length) {
- var listIds = list.map(function(element:SymbolInfoItem):Int {
- return element.value.id;
- }).join("");
- if (listIds.indexOf(sequinceIds) == 0) {
- var ids = list.map(function(element:SymbolInfoItem):Int {
- return element.id;
- }).slice(0, sequence.length());
- return CsList.fromIterable(ids);
- }
- var first = list[0];
- list = list.slice(1);
- list.push(first);
- }
- return new CsList(sequence.length());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement