[Haskell] image conversion

Peter Kaldenberg pkaldenberg at gmail.com
Mon Jun 23 00:13:12 UTC 2014


Dear all,

I have a problem, I am working on functional images and have now a problem that I need to write a function with the following signature

convert::(a->b)->Figure a ->Figure b

Where Figure a :: Pos -> a and type Pos= (Double, Double)

For instance I have an Image chessBoard.
chessBoard::Figure Bool
chessBoard(x,y)= even(round x)==even(round y)

I also have a function boolChar::Bool -> Char

now I want to call convert like convert boolChar chessBoard which will give me an Image with the following type Char.

How can I solve this problem?

Many thanks, Peter 


More information about the Haskell mailing list