NB. Remove bs from a character list no_bs =: monad define if. (#y.) > t =. y. i. 8{a. do. no_bs ((<:t) {. y.) , (>:t)}.y. else. y. end. ) no_bs =: monad define while. (#y.) > t =. y. i. 8{a. do. b =: y. =. ((<:t) {. y.) , (>:t)}.y. end. y. ) readline =: monad define 'p o i' =. 2!:2'readline' y. 1!:2 i 1!:22 i 2!:3 p x =. ((>: z i. 10{a.) }. z=. 1!:1 o), 10{a. 1!:22 o x ) NB. foo=: readline &. > (< ;. 2 read'20021016') fix =: dyad define ap =. (1!:3) & (< x.) 0$(ap &. >) readline &. > (< ;. 2 read y.) )