Very new to Nim, so apologies if this is a stupid question. Consider the 
following code:
    
    
    import std/streams
    
    var s = stdin.newFileStream()
    echo "peek: ", s.peekChar()
    echo "read: ", s.readChar()
    
    
    Run

Assuming I input `1` to stdin, I expect the output to be:
    
    
    peek: 1
    read: 1
    
    
    Run

then the program should terminate. Instead, it outputs `peek: 1` then blocks on 
the `readChar()` as if there are no characters left in the stream.

Is this expected behaviour?

Reply via email to