Skip to content

Instantly share code, notes, and snippets.

@relrod
Forked from duckinator/gist:435482
Created June 12, 2010 07:01
Show Gist options
  • Save relrod/435506 to your computer and use it in GitHub Desktop.
Save relrod/435506 to your computer and use it in GitHub Desktop.

Comments

  • /* */
  • //

Function Definition

:function1 [str1 str2]
  :string (join " " [str1 str2])
  (print string)
;

:function2 [list]
  :string (join " " list)
  (print string)
;

Function Calling

(function1 "foo" "bar")

Defining Variables

:a-list ['abc' 'def']

Throwing It Together

:a-list ['abc' 'def']
(function2 a-list)
(function2 ['foo' 'bar'])

Notes

  • (foo bar baz) is a list, calling the function FOO with args BAR and BAZ
  • [foo bar baz] is a list, treated purely as data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment