diff options
Diffstat (limited to 'src/interp/sys-utility.boot')
-rw-r--r-- | src/interp/sys-utility.boot | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index fb967599..d047296e 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -374,3 +374,20 @@ subString(s,f,n == nil) == quoteForm t == ["QUOTE",t] + +--% assoc + +symbolAssoc(s,l) == + or/[symbolEq?(s,first x) and leave x for x in l | cons? x] or nil + +scalarAssoc(c,l) == + or/[scalarEq?(c,first x) and leave x for x in l | cons? x] or nil + +stringAssoc(s,l) == + or/[stringEq?(s,first x) and leave x for x in l | cons? x] or nil + +--% lassoc + +symbolLassoc(s,l) == + p := symbolAssoc(s,l) => rest p + nil |