Artifact a3089b89496a28482341fb802cf9d3d908214062af118224cf788d27cb6aa81a:
- File
psl-1983/tests/mini-easy-non-sl.red
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 738) [annotate] [blame] [check-ins using] [more...]
% MINI-NON-SL.RED Simple non sl functions Procedure Atsoc(x,y); If Not PAIRP y then NIL else if Not PAIRP car y then Atsoc(x,cdr y) else if x EQ car car y then car y else Atsoc(x, cdr y); Procedure GEQ(N1,N2); not(N1< N2); Procedure LEQ(N1,N2); not(N1 > N2); Procedure EqCar(x,y); PairP x and (Car(x) eq y); procedure COPYD(newId,OldId); Begin scalar x; x:=Getd OldId; If not Pairp x then return <<Print List(OLDID, " has no definition in COPYD "); NIL>>; Return PUTD(newId,car x,cdr x); End; Procedure Delatq(x,y); If not Pairp y then NIL else if not Pairp car y then CONS(car y,Delatq(x,cdr y)) else if x eq caar y then cdr y else CONS(car y,Delatq(x,cdr y)); End;