shingarov / MachineArithmetic

A mathematical foundation for Smalltalk-25
MIT License
17 stars 6 forks source link

Add class `Query` #284

Closed janvrany closed 4 months ago

janvrany commented 4 months ago

This commit adds class Query implementing "query pattern". The API was chosen to be compatible with Smalltalk/X counterpart 1.

shingarov commented 4 months ago

The more I am re-reading this code, the more excited I become. So this program:

^block on: self do: [:q | q resume: value ]

is basically proof of Yoneda, and essentially expresses the meaning of "apply" (cf. Reader and -> in Haskell). Let's merge this in for now, as a starting point, but I suspect this can serve as the foundation for much deeper results.