Changeset 2531


Ignore:
Timestamp:
06/22/03 17:55:45 (19 years ago)
Author:
piso
Message:

COMPLEMENT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/list.lisp

    r2530 r2531  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: list.lisp,v 1.38 2003-06-22 17:51:07 piso Exp $
     4;;; $Id: list.lisp,v 1.39 2003-06-22 17:55:45 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    8989       ,element))
    9090
    91 (defun complement (function)
    92   #'(lambda (&optional (arg0 nil arg0-p) (arg1 nil arg1-p) (arg2 nil arg2-p)
    93            &rest more-args)
    94      (not (cond (more-args (apply function arg0 arg1 arg2 more-args))
    95                 (arg2-p (funcall function arg0 arg1 arg2))
    96                 (arg1-p (funcall function arg0 arg1))
    97                 (arg0-p (funcall function arg0))
    98                 (t (funcall function))))))
    99 
     91(defun complement (f)
     92  #'(lambda (&rest x) (not (apply f x))))
    10093
    10194(defun constantly (x)
Note: See TracChangeset for help on using the changeset viewer.