Function that replaces space with number which represents stars around

Published: 8/11/2019
Function that replaces space with number which represents stars around
Source: STACKOVERFLOW.COM

I have list of arrays where are spaces and *. I'm trying to write a function that takes list of arrays and replaces spaces with number of * which are around. It's something like mines searching. type Board = [String] board :: Board board = [" ", " * ", " * ", " * ", " * ",] Function should return this ["11100", "1*210", "12*21", "123*1", "1*211",]

Read more
Related news
Comment
FACEBOOK