WRF to below example my idea is to check whether red is present in the list mylist. You can very well use LINQ on enumerable in C#
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.