Guest User

Untitled

a guest
Feb 17th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. ## Process
  2.  
  3. A Process can be represented a series of "slots", that is followed by a series of commands or instructions that operate on values in those slots.
  4.  
  5. ```
  6.  
  7. [][][] -> slots
  8. {...} -> commands
  9. ```
  10.  
  11. Processes can be thought of as a form of evaluatable code, that is more fluid and less constrained then virtual machine instructions.
  12.  
  13. For example, that following is a visual, human readbale representation of a process.
  14.  
  15. ```
  16. ($a, $b) {
  17. +($a $b 5)
  18. set($b, 0)
  19. }
  20.  
  21. ```
  22.  
  23. This process has 2 slots. It adds the value of the second slot, `$b`, and 5, to the first slot. Then, it sets the value of the second slot to 0.
  24.  
  25. ### Slots
  26.  
  27. The main difference between traditional functions in programming is that slots do not create a new environment, or do they copy objects or values passed into their slots. They operate on the same instances or copies of them.
Add Comment
Please, Sign In to add comment