/usr/share/gauche-0.9/0.9.1/lib/gauche/experimental/app.scm is in gauche 0.9.1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ;; *HIGHLY EXPERIMENTAL*
;; Haskell-ish application. May change later.
;;
;; ($ f a b c) => (f a b c)
;; ($ f a b c $) => (lambda args (apply f a b c args))
;; ($ f $ g a b c) => (f (g a b c))
;; ($ f $ g a b c $) => (lambda args (f (apply g a b c args)))
;; ($ f $ g $ h a b c) => (f (g (h a b c)))
;; ($ f a $ g b $ h c) => (f a (g b (h c)))
;; ($ f a $ g b $ h $) => (lambda args (f a (g b (apply h args))))
;;
;; ($* f a b c) => (apply f a b c)
;; ($* f a $ g b c) => (apply f a (g b c))
;; ($* f $* g $ h a b) => (apply f (apply g (h a b)))
;; ($* f $* g $* h a b) => (apply f (apply g (apply h a b)))
(define-module gauche.experimental.app
(export $ $*))
(select-module gauche.experimental.app)
(define-syntax $
(syntax-rules ()
[(_ f . rest) (%$-rec () () f . rest)]
[(_) (syntax-error "Invalid $-form: ($)")]))
(define-syntax $*
(syntax-rules ()
[(_ f . rest) (%$-rec (apply) () f . rest)]
[(_) (syntax-error "Invalid $*-form: ($*)")]))
(define-syntax %$-rec
(syntax-rules ($ $*)
;[(_ (app ...) es $) (app ... pa$ . es)]
;[(_ (app ...) es $*) (app ... pa$ apply . es)]
[(_ (app ...) (e ...) $ . rest) (app ... e ... ($ . rest))]
[(_ (app ...) (e ...) $* . rest) (app ... e ... ($* . rest))]
[(_ apps (e ...) x . rest) (%$-rec apps (e ... x) . rest)]
[(_ (app ...) es) (app ... . es)]))
|