Grunt reference error

Gruntfile.js

   module.exports = functions(grunt)
    {
     grunt.initConfig({
   //pkg: grunt.file.readJSON('package.json'),
     concat: {
    options: {
        separator: ';',
    },
       dist: {
        src:   ['APIdocu/AccountsCollection.md', 'APIdocu/AccountsFollowersCollection.md'],
    dest: 'APIdocu/ConcatApis.md',
        //files: {
            //'APIdocu/NewApi.md' : ['APIdocu/AccountsCollection.md', 'APIdocu/AccountsFollowersCollection.md']
        },
},
});

grunt.loadNpmTasks('grunt-contrib-concat');
//tasks
grunt.registerTask('default', ["concat"]);
 }

error message

Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Loading "Gruntfile.js" tasks...ERROR
ReferenceError: grunt is not defined
at Object.<anonymous> (C:\Users\gs1460\Desktop\Markdownfiles\apis\Gruntfile.js:1:90)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at loadTask (C:\Users\gs1460Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt\task.js:323:10)
at Task.task.init (C:\Users\gs1460\Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt\task.js:437:5)
at Object.grunt.tasks (C:\Users\gs1460\Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt.js:120:8)
at Object.module.exports [as cli] (C:\Users\gs1460\Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt\cli.js:38:9)

    Running tasks: concat:dist
    Warning: Task "concat:dist" not found. Use --force to continue.
    Aborted due to warnings.

How do I get rid of this error. I need to concatenate md files to one.It gives me the above error. Tried changing the code many times. But same issue. Can you help in this.

Probably the problem is that you are writting functions instead of function. Check also if the variable grunt is in the correct scope. And please use tabs correctly!

module.exports = function(grunt)

Regards.