I know verse is a functional language. Does it have built-in map, reduce, filter functions like other functional languages?
Also does it implement concepts like closure and currying?
I ask because I only really see Verse being implemented using OO patterns and I don’t see any documentation around these types of functional concepts.
Hi, I think calling Verse a “functional language” is an over simplification. You can read more about Verse’s design goals on the Verse Language Reference. It states it’s multi-paradigm:
- Multi-paradigm to use the best of functional programming, object-oriented programming, and imperative programming, such as being as deterministic as possible. One example of this is that data is immutable by default, and given the same code and data, results will always be exactly the same.
Verse will let you do higher order functions, immutability and pure functions among other things, but it’s not a requirement. There are a lot of examples of creating custom devices by extending creative_device
, which explains why a lot of the code you might have seen looks more object oriented.
1 Like