miking-lang / miking

Miking - the meta viking: a meta-language system for creating embedded languages
Other
51 stars 31 forks source link

Extend bool stdlib with 'and' and 'or' on arrays #862

Closed marten-voorberg closed 2 months ago

marten-voorberg commented 2 months ago

Currently, we have and and or with arity 2. This leads to some rather ugly syntax when you have a list of conditions. E.g. (and p1 (and p2 (and p3 p4))). With this pr, you'd be able to write allb [p1, p2, p3, p4]. The name comes from all (all must be true) and b for boolean.

marten-voorberg commented 2 months ago

Closing because I used the wrong base branch...