Odd word problem/TrivialCharacterStreamSupportForJ: Difference between revisions

Content added Content deleted
mNo edit summary
mNo edit summary
Line 3: Line 3:
Note that the =. definitions provided here are for illustration purposes only (and, in fact, they will be discarded after loading the code from file), and are meant to be replaced by similar code at stream initialization time. Note that this implementation allows only one input stream and one output stream per locale.
Note that the =. definitions provided here are for illustration purposes only (and, in fact, they will be discarded after loading the code from file), and are meant to be replaced by similar code at stream initialization time. Note that this implementation allows only one input stream and one output stream per locale.


<lang j>instream=. 'example text'
<lang j>setstreams=: 3 :0 NB. convenience wrapper
instream=: y
last=: _1
outstream=: ''
)


instream=. 'example text'
last=. _1
last=. _1