     % pid plus a message telling to take the given food.
     %
     % This is exactly the same as above, but the <<- syntax
-    % automatically adds Pid.self for us.
-    pid <<- {'take, food}
+    % automatically adds Process.self for us.
+    pid <- { Process.self, {'take, food} }
 
     % Retrieve the message again. Also, let's set a timeout
     % now for 10 seconds.

    % Spawn a new process by invoking the 'loop method defined below.
    % Notice that all methods defined in Fridge are actually defined
    % in Fridge::Proto, this is why we pass Fridge::Proto below.
    pid = Pid.spawn Fridge::Proto, 'loop, [list]

    % The values returned by constructor are kept as instance variables.
    { 'pid: pid }

    % than one type of message, you have to use receive/match.
    receive
    match {from, {'store, food}}
      from <- { Process.self, 'ok }
      loop([food|foodlist])
    match {from, {'take, food}}
      if foodlist.include?(food)
        from <- { Process.self, {'ok, food} }
        loop(foodlist.delete(food))
      else
        from <- { Process.self, 'not_found }
        loop(foodlist)
      end
    match {from,'see}
      from <- { Process.self, foodlist }
      loop(foodlist)
    match 'terminate
      'ok
