AshleyYakeley / Truth

Changes and Pinafore projects. Pull requests not accepted.
https://pinafore.info/
GNU General Public License v2.0
32 stars 0 forks source link

Record functions #290

Open AshleyYakeley opened 4 days ago

AshleyYakeley commented 4 days ago

Record functions are just like record constructors, just without the pattern matching.

Defined like this (T1, T2 can be any positive types):

rf of x: T1; y: T2; end = foo x y;

Used exactly like record constructors:

rf of x = t1; y = t2 end;

let x = t1; y = t2 in rf;