Functional programming approach for Java's input/output streams
- by Elazar Leibovich
I'm using Java's DataInputStream with scala to parse some simple binary file (which is very bad exprerience due to the lack of unsigned types, even in scala, but that's a different story).
However I find myself forced to use mutable data structure, since Java's streams are inherently state preserving entities.
What's a good design to wrap Java's streams with nice functional data structure?