25 lines
		
	
	
	
		
			337 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			337 B
		
	
	
	
		
			Text
		
	
	
	
	
	
def otherwise=true:
 | 
						|
 | 
						|
proc xxtoy(chan in, out, value x, y)=
 | 
						|
    var c:
 | 
						|
    seq
 | 
						|
	c:= not EOF
 | 
						|
	while c<>EOF
 | 
						|
	    seq
 | 
						|
		in ? c
 | 
						|
		if
 | 
						|
		    c=x
 | 
						|
			seq
 | 
						|
			    in ? c
 | 
						|
			    if
 | 
						|
				c=x
 | 
						|
				    out ! y
 | 
						|
				otherwise
 | 
						|
				    out ! x; c
 | 
						|
		    otherwise
 | 
						|
			out ! c
 | 
						|
:
 | 
						|
chan link:
 | 
						|
par
 | 
						|
    xxtoy(input, link, 'a', 'b')
 | 
						|
    xxtoy(link, output, 'b', 'c')
 |