andrew-johnson-4 / lambda-mountain

Tiny Functional Language Compiling to Assembly (7000 Lines of Code)
https://andrew-johnson-4.github.io/lambda-mountain/
MIT License
17 stars 0 forks source link

Type Coercion for Typed Properties #836

Open andrew-johnson-4 opened 5 days ago

andrew-johnson-4 commented 5 days ago

Some operations would be faster on sorted lists. So they can just specify a coercion that automatically sorts as necessary.

List+List::Sorted

andrew-johnson-4 commented 4 days ago

Type properties have two separate verifiable assertions

1) does this type have the List::Sorted property? 2) is the List::Sorted property only given to properly sorted lists?