code: function readLine() {
      // Ensure asynchronous operation is set up
      ensureInitialSetup();
  
      // Set up listener for when input arrives (it just continues on the next step)
      inputListenerFiber = Fiber.current;
  
      // If there isn't any, terminate this fiber until there is
      if (inputBuffer === "") {
          // Register a listener to continue the work
          Fiber.yield();
      }
  
      // There was input, remove listener
      inputListenerFiber = null;
  
      // Take first line of input and return it to caller
      var ix = inputBuffer.indexOf("\n");
      var ixAfterLine = ix + 1;
      if (ix === -1) {
          ix = inputBuffer.length;
          ixAfterLine = ix;
      }
      var firstLine = inputBuffer.slice(0, ix);
      inputBuffer = inputBuffer.slice(ixAfterLine);
  
      return firstLine;
  }
docs: /* This function is called from the "main" nicl'd code to ask for a line of input.
  If there is input available in the buffer from previously read data, it will
  remove it from the buffer and return it to the caller directly. If there is
  no input available, it will "suspend" this fiber of execution, to be woken
  back up when input arrives, and continue running the main "nicl'd" code.