Public feed #602485

Untitled

public text v1 · immutable
Raw Edit
·published 2007-07-04 03:02 UTC
rendered paste body
cpsGetChar processFunc = do
    c <- liftIO getChar
    if c == 'q'
        then return ()
        else callCC $ \ k -> cpsProcessChar c >>= k

cpsProcessChar c = do
    liftIO $ putChar c
    if c == 'x'
        then return ()
        else callCC $ \ k -> cpsGetChar >>= k