Closed gtrepta closed 1 week ago
Maybe this could be...?
class Assoc(MLSyntaxSugar):
symbol: str
args: tuple[Pattern, ...]
Then the pattern
method can just build the App
with symbol
. And top_down
/bottom_up
transformers can match on an Assoc
and do a let
over symbol
if they want.
Maybe this could be...?
class Assoc(MLSyntaxSugar): symbol: str args: tuple[Pattern, ...]
Good idea, let's go with this solution.
The
top_down
andbottom_up
operations on aKore
structure don't iterate over the arguments in aLeftAssoc
orRightAssoc
. This fixes that.