0

Functional Programming with BrightScript - Exploration

Functions in BrightScript can be passed just like any value, which enables adoption of Functional Programming coding style. Here are few examples.

Add 1 to all items of an array with Map()

MappedArray = FpListMap( "FpAdd1" )( SomeInputArray )

 

Examples for Filter() and functions composition can be found here

https://github.com/brightscripters/FP.Brs/blob/main/FP.brs

0 comments

Please sign in to leave a comment.