diff -r e66bd5c563eb -r b5b5583a3a08 progs/bf/bfi.sc --- a/progs/bf/bfi.sc Mon Jul 27 11:02:48 2020 +0100 +++ b/progs/bf/bfi.sc Thu Jul 30 13:50:54 2020 +0100 @@ -7,12 +7,10 @@ // -import scala.util._ - -// BF memory as a map +// BF memory is represented as a Map type Mem = Map[Int, Int] -// reading and writing BF memory +// safe reading and writing of BF memory def sread(mem: Mem, mp: Int) : Int = mem.getOrElse(mp, 0)