How many units of sand come to rest? (now there's a floor)
- split by newline
- reduce to
MapSet
of rocks, viafor
comprehensions Enum.chunk_every/4
comes in very handy
- first, compute the max depth; add two, and then add "floor" to
blocks
, using@x_tolerance
- raise if we run out of width (need up the
@x_tolerance
) - add to new
sands
MapSet as well asblocks
- add
full?/1
which simply checks for the three below source to be there - call itself until full
- return
MapSet.size(sands)
mix run
mix test