USE OCAML PROGRAMMING LANGUAGE :
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.
USE OCAML PROGRAMMING LANGUAGE :
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
USE OCAML PROGRAMMING LANGUAGE :
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!