gara icon indicating copy to clipboard operation
gara copied to clipboard

Results 13 gara issues
Sort by recently updated
recently updated
newest added

First, kudos for your new library! As you probably know, patty consists of two macros: one to generate algebraic data types and the other one to do the actual pattern...

```nim import gara proc mymain() = let a = ("a", "b", "c") match a: ("a",): echo a, " matches 1-tuple" ("a", "b"): echo a, " matches 2-tuple" ("a", "b", "c"):...

Coming from Scala's pattern matching, I'm a bit confused what the library is doing. In Scala, pattern matching performs validation, and whether something matches is optional. Picking up on the...

enhancement

Example from Julia's patterndispatch: ``` @pattern f(x) = x @pattern f(2) = 42 println([f(x) for x=1:4]) prints [1, 42, 3, 4] ``` actually the @pattern expands to the following code:...

> For now you can't just pass various expressions tho (2 + 2), as I want to reserve syntax for the patterns If I correctly understood what you mean, you...

enhancement

We need better docs and examples, eventually hosted e.g. as github io pages

Currently gara manages to transform the matches only based on untyped info. I actually like that a lot: it depends on a minimum of knowledge and for the same syntax...