Making `RidgedMulti` generic over type `F` would mean the cast wouldn't be needed.