anchor.diff:              | Some (Choice1Of2 group, rst) -> map (cons group) parseInner rst
               | Some (Choice2Of2 _, rst) -> parseInner rst
               | None -> None
  -
       function
       | '{'::inner -> map Group parseInner inner
       | _ -> None
  
positive.code:         n + Seq.sumBy (innerScore (n+1)) groups
      innerScore 1 g
  
  let readInput file = File.ReadAllText(file).Trim() |> List.ofSeq
  
  let solve1 input =
      let g = input |> parseGroup
      match g with
      | Some (group, _) -> score group
      | None -> 0
  
  [<EntryPoint>]
  let main _ = 
      let input = readInput "input.txt"
  
      test parseGroupOrGarbage [
          ("{}" |> List.ofSeq), Some (Choice1Of2 (Group []), []);
          ("{{}}" |> List.ofSeq), Some (Choice1Of2 (Group [Group []]), []);
          ("{{},{}}" |> List.ofSeq), Some (Choice1Of2 (Group [Group []; Group []]), []);
          ("{{{}},{}}" |> List.ofSeq), Some (Choice1Of2 (Group [Group [Group []]; Group []]), []);
      ]
  
      test score [
  
negative.code:        | '!'::_::rest -> parseInner rest
         | '>'::rest -> Some((), rest)
         | _::rest -> parseInner rest
     function
     | '<'::inner -> parseInner inner
     | _ -> None
  