laurelang icon indicating copy to clipboard operation
laurelang copied to clipboard

Feature: callable in declaration (auto ID) and for each

Open timoniq opened this issue 2 years ago • 0 comments

New notation for predicates:

: #lt(int) -> int.
#lt(x) -> y when y < x.

int[] a = [1,2,3,4,5].
a = lt(5)[].

num = 1 .. a[3];
num[][] list;
s = no_repeat[];

Predicate usage in declarations and automatic linked vars resolution.

: ?person(string name, natural age) -> ID.
!datalink([person], "...").

: ?reason_field(string).
?reason_field("reason1").
?reason_field("reason2").

: ?some_predicate(person, person).
?some_predicate(person p1, person(name, _) _).

$ ... {
    person(name, _) person1;
    person(_, _) person2; -- or `person person2`
    reason_field reason;
}

progress

  • [x] auto ID
  • [ ] for each notation

timoniq avatar Jul 16 '22 09:07 timoniq