[r-t] delta based transposition for blue line generation

Mark Davies mark at snowtiger.net
Sat Jun 11 22:24:48 UTC 2016

I suppose you could do something like:

   val placeToCCBR = "1234567890ETABCDFGHJKLMNPQRSUVWYZ".toSeq
   val crossChars = "-x"
   val CCBRToPlace = placeToCCBR.zipWithIndex.map{(_,Some(_))}.toMap
   val PNCharToPlace = CCBRToPlace ++ crossChars.map{(_,None)}.toMap

That might not compile just yet... but it seems pleasant to have all the 
special cases for character handling dealt with in one place, and hidden 
behind a constant Map too, so out of the main run-time.

The other way of dealing with it is to say that any character other than 
dot, whitespace or alphanumeric is the cross change... then use a 
straight CCBRToPlace.get(_) to give your Option without any further effort!


This email has been checked for viruses by Avast antivirus software.

More information about the ringing-theory mailing list