add (str)
This commit is contained in:
		@@ -221,6 +221,10 @@ function Library (ronin) {
 | 
			
		||||
    return arg
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  this.str = (...args) => {
 | 
			
		||||
    return args.reduce((acc, val) => { return acc + val }, '')
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  this.test = (name, a, b) => {
 | 
			
		||||
    if (Array.isArray(a)) {
 | 
			
		||||
      // TODO: make testing more solid
 | 
			
		||||
 
 | 
			
		||||
@@ -44,4 +44,8 @@
 | 
			
		||||
  (def addOne (lambda (a) (add a 1)))
 | 
			
		||||
  (test "def - value" aaa 123)
 | 
			
		||||
  (test "def - func" (addOne 4) 5)
 | 
			
		||||
 | 
			
		||||
; Generics
 | 
			
		||||
 | 
			
		||||
  (test "str" (str 1 4 "-" (add 3 4) ".jpg") "14-7.jpg")
 | 
			
		||||
)
 | 
			
		||||
		Reference in New Issue
	
	Block a user