giovinazzo-kevin / Ergo

Other
4 stars 0 forks source link

Improve Dict pattern matching #91

Open giovinazzo-kevin opened 6 months ago

giovinazzo-kevin commented 6 months ago

It would be cool to match dictionaries with the form: functor { optional_arg: value } A Where A is a variable that binds to the whole Dict.

This form, or something similar, is required because, right now, in order to achieve pattern matching while capturing the Dict in a variable, one must do something like:

predicate(A) :-
    A = functor { optional_arg: value }.