aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap/utility.clisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/strap/utility.clisp')
-rw-r--r--src/boot/strap/utility.clisp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/boot/strap/utility.clisp b/src/boot/strap/utility.clisp
index 8a06ff0c..7125bd09 100644
--- a/src/boot/strap/utility.clisp
+++ b/src/boot/strap/utility.clisp
@@ -48,6 +48,12 @@
(FTYPE (FUNCTION ((|%List| |%Thing|) |%Thing|) (|%List| |%Thing|)) |remove|))
(DECLAIM
+ (FTYPE
+ (FUNCTION (|%Thing| (|%List| (|%Pair| |%Thing| |%Thing|)))
+ (|%Maybe| (|%Pair| |%Thing| |%Thing|)))
+ |objectAssoc|))
+
+(DECLAIM
(FTYPE (FUNCTION ((|%List| |%Thing|) (|%List| |%Thing|)) (|%List| |%Thing|))
|setDifference|))
@@ -329,6 +335,17 @@
((OR (CHARACTERP |x|) (INTEGERP |x|)) (|removeScalar| |l| |x|))
(T (|removeValue| |l| |x|))))
+(DEFUN |objectAssoc| (|x| |l|)
+ (PROG (|a| |p|)
+ (RETURN
+ (LOOP
+ (COND
+ ((NOT
+ (AND (CONSP |l|) (PROGN (SETQ |p| (CAR |l|)) (SETQ |l| (CDR |l|)) T)))
+ (RETURN NIL))
+ ((AND (CONSP |p|) (PROGN (SETQ |a| (CAR |p|)) T) (EQ |a| |x|))
+ (RETURN |p|)))))))
+
(DEFUN |charPosition| (|c| |s| |k|)
(PROG (|n|)
(RETURN