[Uim] Optional arguments of a function definition
YamaKen
yamaken at bp.iij4u.or.jp
Mon Jun 21 11:53:27 EEST 2004
Sorry for late reply.
At Tue, 15 Jun 2004 13:38:30 +0900,
tkng at xem.jp wrote:
>
> On Sun, 13 Jun 2004 17:22:11 -0500
> Hiroyuki Komatsu <komatsu at taiyaki.org> wrote:
>
> > Can I use optional arguments of a function definition in uim-scheme,
> > such as &optional and/or &rest in Emacs-Lisp?
>
> I think you can't, because there are no definitions such as &optional
> and &rest in R5RS. I think that it's difficult for us to make such
> extention to uim's interpreter. But if you write, I'll commit.
Although &optional is not supported, uim's Scheme interpreter
can accept variable length args. See 'proc-or' definition in
util.scm and play with uim-sh.
(define proc-or
(lambda xs
(if (null? xs)
#f
(or (car xs)
(apply proc-or (cdr xs))))))
-------------------------------
YamaKen yamaken at bp.iij4u.or.jp
More information about the uim
mailing list