(Quick Reference)

3 Defining Functions - Reference Documentation

Authors:

Version: 2.0.0.RC2

Table of Contents

3 Defining Functions

The plugin will discover all .clj folders defined under src/main/clj/ and will make all of the functions defined in those source files available for invocation from Grails artefacts (controllers, services, etc...).

;; src/main/clj/math.clj
(ns grails)

(defn add_numbers [x y z] (+ x y z))

3.1 Using create-clojure-script

The plugin provides a convenience command for creating Clojure source files. See the create-clojure-script command documentation.