Fork me on GitHub
#meander
<
2022-10-05
>
noprompt22:10:48

Here's is an example demonstrating an average computation.

noprompt22:10:18

Just FYI zeta examples are a bit more verbose at the moment but less "noisy" syntax will be available/is easily achieved through notation extensions. These allow you to extend the parser/reader with rewrite rules.

noprompt22:10:25

The parser doesn't know anything about ?x syntax, for example. It only knows about Clojure's primitive data types and how to resolve operators.

noprompt22:10:51

Using the example above. I can also create sum and combine it with avg to compute both at the same time.

noprompt22:10:40

With the logical operators like m/each (conjunction) and/or m/some (`disjunction`) it's possible to constrain what is summed/averaged etc.

noprompt22:10:45

The sum and avg definition in the examples above don't constrain the ?incoming type since this is just a demonstration. But it will be possible to say

(m/each (m.num/any) ?n)
and constraint to numbers. Right now, only () is working.

noprompt23:10:05

Oh. Off topic, I should mention that I'm planning to release meander.zeta as just meander when it is ready. I have spent a while thinking about what I want to achieve with the project and distill those bits into a library that can be extensible, support async/sync, and friendly to interpretation/compilation. Also, I wanted the left and right sides of rules to support the same set of operators. That has been hard and there is still work ahead but it is true today that left and right both support projection (`let`), conjunction, disjunction, and negation which makes possible many things.

👍 2
Jimmy Miller23:10:58

Why not meander.omega? 🙂

💯 1
noprompt23:10:52

Ha! Indeed! 😄