Hi,
using list comprehensions for the kind filter&map operation you're
wanting to express, seems like a good option.
border p = check "no border in page" [ x | (Border x) <- p]
margin p = check "no margin in page" [ x | (Margin x) <- p]
check :: String -> [a] -> a
check err_msg []=
I am building a description of page state using a list of pageStyles
> data PageStyle=Orientation Orient
> | Margin BoxData
> | Border BoxData
> | CurrentYPos Float
> | CurrentXPos Float
To extract particular items from the