walk

Walking in Wasilla alvin January 3, 2019 - 7:37am

This photo of walking through a neighborhood in Wasilla, Alaska in the winter reminds me of a few walks I took here in Colorado in the last few days after our New Years snow.

Came across a moose eating a tree

Diary entry from January, 18, 2011, Wasilla, Alaska: While on a walk this morning I came across a large moose. It was just standing there, eating a tree. I didn‘t bother it, and it didn‘t bother me.

How to traverse a Map in Scala (for loop, foreach)

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 11.18, “How to Traverse a Map in Scala”

Problem

You want to iterate over the elements in a map.

Solution

There are several different ways to iterate over the elements in a map. Given a sample map: