fn tyi (w :&World, x :Q) -> Ret { let x = input_stream_designator (w, x)?; if let Node::Stream(s) = &mut *x.clone().lock().unwrap() { // ^^^^^^^ // Trouble if let Some(read) = &s.read { if let Some(la) = s.clone().lookahead { s.lookahead = None; Ok(la.clone()) } else { // // The lock() above must be droped here. How? // // Otherwise flush will dead lock // flush (w, x.clone())?; let buf = &mut[0 as u8]; match read.lock().unwrap().read(buf) { Ok(1) => Ok(makchar (w, buf[0] as char)), Ok(0) => Ok(w.u.nil.clone()), _ => error (w, "I/O Error", x.clone()) } } } else { error (w, "Stream not fit for input", x.clone()) }} else { error (w, "Not a stream", x.clone()) }}