Finding optimal strategies in sequential games with the novel selection monad