Inspired from the scalaz (https://github.com/scalaz/scalaz) project
Transform fa using f, collecting all the Gs with ap.
fa
f
G
ap
Traverse with the identity function.