guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: srfi-26


From: Alex Shinn
Subject: Re: srfi-26
Date: Fri, 16 Jan 2004 12:28:42 +0900
User-agent: Wanderlust/2.10.1 (Watching The Wheels) Emacs/21.3 Mule/5.0 (SAKAKI)

At Fri, 16 Jan 2004 08:08:23 +1000, Kevin Ryde wrote:
> 
> Alex Shinn <address@hidden> writes:
> >
> > The reference implementation is public domain,
> 
> I think the gnu maintainer guide says you still need the author to
> sign a disclaimer before incorporating it.

For public domain work can't you just cut&paste it and then call
yourself the author?

Anyway, the guide says

  A change of just a few lines (less than 15 or so) is not legally
  significant for copyright.

and if you shorten the variable names and refactor cute in terms of cut
you can get it down to 14 lines:

(define-syntax %cut
  (syntax-rules (<> <...>)
    ((_ (slot ...) (f x ...)) (lambda (slot ...) ((begin f) x ...)))
    ((_ (slot ...) (f x ...) <...>) (lambda (slot ... . y) (apply f x ... y)))
    ((_ (slot ...) (pos ...) <> . se) (%cut (slot ... x) (pos ... x) . se))
    ((_ (slot ...) (pos ...) nse . se) (%cut (slot ...) (pos ... nse) . se))))
(define-syntax %cute
  (syntax-rules (<> <...>)
    ((_ (args ...)) (%cut () () args ...))
    ((_ (args ...) <...>) (%cut () () args ... <...>))
    ((_ (args ...) <> rest ...) (%cute (args ... <>) rest ...))
    ((_ (args ...) x rest ...) (let ((y x)) (%cute (args ... y) rest ...)))))
(define-syntax cut (syntax-rules () ((cut . x) (%cut () () . x))))
(define-syntax cute (syntax-rules () ((cute . x) (%cute () . x))))

-- 
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]