Hi everyone. Doug recently checked in a handy new tool for streamlining error 
handling when reading from streams. If you're in a situation where you need to 
check a series of individual read operations for unexpected EOF, the new 
"throw-on-eof" combinator can streamline the error checking for you. So this 
sort of thing:

---
5 read
dup { [ not ] [ 5 length < ] } 1|| [ raise-an-error ] when
...
4 read
dup { [ not ] [ 4 length < ] } 1|| [ raise-an-error ] when
---

Can become instead:

---
[ 5 read ... 4 read ] throw-on-eof
---

-Joe
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to