123456789101112131415161718192021222324252627282930 |
- #!/usr/bin/guile -s
- !#
- (display "Hello World!")
- (newline)
- (define x 5)
- (set! x "Hello World!")
- (define call/cc call-with-current-continuation)
- (string-append "/home" "/" "joshua")
- (string-length "Hello World!")
- ;; This creates a function, that no one can really call.
- (lambda (x) x)
- ;;BUT this creates a function that is immediately called with the parameter 5
- ((lambda (x) x) 5)
- ;; This is the long way of creating a function using the lambda function
- (define add
- (lambda (x y)
- (+ x y)))
- ;; This is the shorthand way of making the same function
- (define (add x y)
- (+ x y))
|