aaditmshah / typecraft

library for crafting types and casting type inhabitants
MIT License
0 stars 0 forks source link

Learn about the theory of concatenative combinators. #38

Closed aaditmshah closed 2 years ago

aaditmshah commented 2 years ago

We need the theory of concatenative combinators in order to implement a VM for typecasting.

aaditmshah commented 2 years ago

I learned that we only need six concatenative combinators for Turing completeness.

  1. dup - To use items on the stack more than once.
  2. drop - To ignore items on the stack.
  3. swap - To rearrange items on the stack.
  4. quote - To convert code into data.
  5. unquote - To convert data into code.
  6. append - To merge multiple quoted items.