Guest User

Untitled

a guest
Jun 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. a = "foo".
  2. b = "bar".
  3. n = 345.
  4.  
  5. ; define a list
  6. alist = ["abc" "def"].
  7.  
  8. ;; joins /str1/ and /str2/ with a space, and print the resulting string
  9. function1 = |str1 str2|
  10. string = join " " [str1 str2].
  11. println string.
  12. .
  13.  
  14. ;; joins all items in /list/ with spaces, and print the resulting string
  15. function2 = |list|
  16. string = join " " list.
  17. println string.
  18. .
  19.  
  20. ; combine the two items with a space.
  21. function1 "foo" "bar".
  22.  
  23. ; combine each item in a-list with a space, and prints them
  24. function2 alist.
  25.  
  26. ; combine each item in ['foo' 'bar'] with a space, and prints them
  27. function2 ["foo" "bar"].
  28.  
  29. println (format "%s%s" a b).
  30.  
  31. println "#{a}#{b}".
  32.  
  33. println n.
Add Comment
Please, Sign In to add comment