i'm asking for parsers,
On the server side (cloud code), is there a way to call a function defined in other function ? Function should not be called on the client

```
Parse.Cloud.define("getProfiles", function(request, response) {..})

Parse.Cloud.define("otherFunction', function(request){

//call to getProfiles })

```
['https://Stackoverflow.com/questions/34129459', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2420289/']
This can be solved with dev policy. I keep in the habit of using `Parse.Cloud.define` as the means of wrapping a function for external invocation, always building and naming them as follows...

```
// this is just a "wrapper" for the simple JS function
Parse.Cloud.define("getProfiles", function(request, response) {
    // the only thing I allow to happen here is:
    // 1) unwrap params...
    var param = request.params.param;
    // 2) call an unwrapped function by the same name (this assumes it returns a promise)
    getProfiles(param).then(function(result) {
        // invoke response success and error
        response.success(result);
    }, function(error) {
        response.error(error);
    });
});

// always have an unwrapped function named identically
function getProfiles(param) {
    // do some work and (usually) return a promise
}

```

Other functions in the cloud, wrapped or unwrapped, can now call the unwrapped function directly.
[Cloud code documentation](https://parse.com/docs/cloudcode/guide) recommends to call defined functions as follows:

You can use `Parse.Cloud.run`.

```
Parse.Cloud.run("getProfiles ", {
    //here you can pass the function request parameters
    userId: user.id
}).then(function(result) {
    //here you will handle the returned results (if function returned response.success())
    console.log(result);
}, function(error) {
    //handle errors if called function returned response.error()
    console.error(error);
});

```

Hope it helps