We need some more videos in here <| sep |> Yea good job . I ' d do it no doubt <| sep |> Try posting in the skyrim mods sub <| sep |> Before I begin , I would like to say that writing pure functional code doesn ' t mean that you can ' t use mutable data structures . Also , list isn ' t only data structure available to you and it isn ' t suitable for many problems . I will only address your problem with startGame function , not your overall design . Converting Tile to StateSquare requires some state . You don ' t want to place same player twice . You must know which players aren ' t positioned yet , that depends on number of PlayerStartPositions that have been converted already and method by which you assign player to starting position . Consider simple example . Take a String and replace letter a in it by number of previous occurrences . f String String f ss go 0 ss where go go n ' a ' xs show n go n 1 xs go n xxs x go n xs f abacad 0 b 1 c 2 dFirst argument of go acts as an accumulator . You can change it at every recursive call . Here , n is simply incremented on every occurrence of letter a . In your concrete case you can flatten your Map with concat and use function like this f f ps ts go ps ts where all tiles converted , end go all players are already placed go PlayerStartPositionts EmptySquare go ts some players aren ' t placed yet go pps PlayerStartPositionts InterestingSquare Nothing Nothing Nothing go ps ts not a player starting position , convert this tile as usuall go ps tts t 2 s t go ps ts t 2 s Tile StateSquare t 2 s undefinedOr using Data . List . unfoldr b Maybe a , b b f f ps ts unfoldr g ps , ts where g , Maybe StateSquare , , g ps , Nothing g , PlayerStartPositionts Just EmptySquare , , ts g pps , PlayerStartPositionts Just InterestingSquare Nothing Nothing Nothing , ps , ts g ps , tts Just t 2 s t , ps , ts t 2 s Tile StateSquare t 2 s undefinedAdvantage of unfoldr is that people know how it works and they don ' t have to think about your recursive function that much . Converting flat list back to nested list shouldn ' t be a problem unconcat Int unconcat n unconcat n xs take n xs unconcat n drop n xs