let apply_action ~inject:_ ~schedule_event:_ model = function
| Action.New -> Map.add_exn model ~key:(Map.length model) ~data:0
| Update (location, diff) ->
Map.update model location ~f:(function
| None -> 1
| Some x -> x + 1)
;;
The last line should probably read | Some x -> x + diff, one reason being that the variable isn't used otherwise.
I'm not sure where best to report this, so I'm sorry if this isn't the appropriate place.
When visiting the project website https://opensource.janestreet.com/bonsai/ I'm greeted with some example code:
The last line should probably read
| Some x -> x + diff
, one reason being that the variable isn't used otherwise. I'm not sure where best to report this, so I'm sorry if this isn't the appropriate place.