Couldn't match type ‘a’ with ‘Block’ in Either

Published: 14/02/2020
Couldn't match type ‘a’ with ‘Block’ in Either
Source: STACKOVERFLOW.COM

I'm trying to create a function that works both with [Block] and [Ground]. To tho so, I declared that the function recieves [a] and an Int that works as a flag to hold the infrmation of which one of the lists I'm using each time the function is invoked. printRow::[a]->Position->Int->[Picture] printRow [] pos n = [] printRow (h:t) (x,y) n | n==0 = ((printTile (Right h) (x,y)):(printRow t

Read more
Related news
Comment
FACEBOOK