Page 1 of 1

USE OCAML PROGRAMMING LANGUAGE :

Posted: Mon May 02, 2022 12:19 pm
by answerhappygod
USE OCAML PROGRAMMING LANGUAGE :
Use Ocaml Programming Language 1
Use Ocaml Programming Language 1 (64.14 KiB) Viewed 51 times
1 Contagion = (a) Write a function printmat : bool array array -> unit = <fun> that < given a bool matrix it prints it on screen with ones and zeros, instead of true and false. (b) Write a function onstepcontagion : bool array array -> bool array array = <fun> that given a rectangular bool matrix, where true repre- sents an infected square and false represent non-infected square it calculates the next step of infection. Infected squares remain infected indefinitely, non-infected squares become infected if the they are vertically/horizontally adjacent to at least two other infected squares.