[Haskell-cafe] Tail Recursion within the IO Monad

2007-05-16 Thread Rob Hoelz
Hello everyone, You may have seen my message about how I'm writing a binding to a C library. This is another question related to that. So, let's say I have a linked list implemented in C. Here's what its definition looks like: struct __linked_list { void *data; struct __linked_list

Re: [Haskell-cafe] Tail Recursion within the IO Monad

2007-05-16 Thread Brandon S. Allbery KF8NH
On May 16, 2007, at 12:23 , Rob Hoelz wrote: And as long as I'm asking, is there some kind of monadic function composition operator? I'd like to clean up the above with something like peekCString . peek . linked_list_getdata... (=)? -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell]

Re: [Haskell-cafe] Tail Recursion within the IO Monad

2007-05-16 Thread Rob Hoelz
Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On May 16, 2007, at 12:23 , Rob Hoelz wrote: And as long as I'm asking, is there some kind of monadic function composition operator? I'd like to clean up the above with something like peekCString . peek . linked_list_getdata... (=)?

Re: [Haskell-cafe] Tail Recursion within the IO Monad

2007-05-16 Thread Jules Bean
Rob Hoelz wrote: item - linked_list_getdata listPtr next - linked_list_next listPtr cStr - peek item hStr - peekCString cStr t - linkedListToStringList next return (hStr : t) item - linked_list_getdata listPtr next -