# [Julia 1.0], 73 bytes

```julia
f(s,b=1<0)=[c∈"aA" ? b=!b : print(c+32isletter(c)sign('_'-c)b) for c=s]
```

Stolen and improved from [Simeon Schaub's great answer](https://codegolf.stackexchange.com/a/189535/98541)


[Try it online!][TIO-knynqqm5]

[Julia 1.0]: http://julialang.org/
[TIO-knynqqm5]: https://tio.run/##ZVJfb9MwEH/fpzj60kYExOBtopqiAmJiYohNQgghdHEujVvXDr5Lu@wT7HPyRco5aRFa8@Ak9t3vn2/VOYvn9/t9PeO8nJ@/fZXNf5g/j48TLCZwCeX8WQkX0EbrZWaev3lt2ZEIxZnJ2C79bPpr@sJkZQZ1iGDm/FORJncNwe/OmjWUMey8nt3Dqtu0DGFLEUSPHT70UIXly0l2NqA7P8vOtHcRNq11KDZon/WWG6qAO2OIue6c6086vjUo0GDbkmfYNeQHggW2fB1Uwpp6UKw@dDF9lwFjpczEfpratgQIPohpwHqwcvkUPpkhX0GoB1zrWax0SV8OG9RC8ugN5YBahNUmaZY4GtCeZbLsN@QlB8sgAZhMF2kAo3utJe0@opeh6qENzoo1eSpuYxAyosJGAt2qu5hiOaip7NZWHbpkPYDR9ALrvsDOyljThp2GrgTkV6G3fpmMMtYk/QgZ0ettOSXtU4ON4FG6iA6iXTbCB@Ykz@ktKAInOGdruhiOUuh0uFklX0bSGwnlSoUzoHrVfPVfNC2q8lEUhdbRMf@BJ3lDJ4cB@T@3g3HBNcGGkDU@Bk9pJDD2w@iNukdXeUqNW4r24DANh1Izn8wOFqhPWopCXyfDeBwipwuDKb7cupvFp6dlu4/FHVx9@HcOV7dQXH99X7z7DjefdaL2fwE "Julia 1.0 – Try It Online"