Skip to content

Instantly share code, notes, and snippets.

View sjbrower's full-sized avatar

Scott Brower sjbrower

  • Memphis, Tennessee
  • 14:59 (UTC -05:00)
View GitHub Profile
@sjbrower
sjbrower / BrightScript Linq
Last active October 9, 2025 15:06
Roku BrightScript Linq style chainable lambda array system
' This a relatively simple system that can load an AA or Array, process and manipulate it using chainable queries, and return queried data or a resulting AA or Array.  This is loosely based on Linq found in .Net but is not lazily evaluated like Linq is.
' Details of available functions are after the code
' Feel free to contact me by email with any questions
' Create some objects
' AA = { a: 6, b: 7, c: 8, d: 9, e: 10 }
' List = CreateObject("roList"): List.AddTail(11): List.AddTail(12): List.AddTail(13): List.AddTail(14): List.AddTail(15)
' Create a Linq variable with 1-5, the AA of 6-10, and the List of 11-15, and checkpoint it
' Work = Linq().FromArray([1,2,3,4,5]).AppendAA(AA).AppendList(List).Save("Initial")