Lane's Blog

Roguestar, Haskell, and Fun

Skip to: Content | Sidebar | Footer

Month: January, 2009

MaybeArrow?

4 January, 2009 (19:16) | Haskell | By: Lane

As I’ve found myself repeatedly writing a bit of code that looked vaguely like this:

get :: SomeArrow String (Maybe Thing)

foo :: [Thing] -> FooThing

. . .

getAToZ :: SomeArrow () (Maybe FooThing)
getAToZ = proc () ->
do m_a <- get -< “a”
m_b <- get -< “b”
[...]