|
|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 640 (0x280)
Types: TextFile
Names: »APPSORT.SCL«
└─⟦216f59cd8⟧ Bits:30002641 SCANLOG - Piccoline vers. nov. 87
└─⟦this⟧ »APPSORT.SCL«
vælg_een sorter
sorter(<X..Y>,S) hvis
split(X,Y,A,B),
sorter(A,S1),
sorter(B,S2) og
konkatener(S1,<X..S2>,S).
sorter(<>,<>).
slut.
vælg_een konkatener
konkatener(<X..Y>,L,<X..Z>) hvis
konkatener(Y,L,Z).
konkatener(<>,L,L).
slut.
split(Element,<A..Hale1>,<A..Hale2>,L) hvis
orden(A,Element) og
split(Element,Hale1,Hale2,L).
split(Element,<A..Hale1>,L,<A..Hale2>) hvis
ikke(orden(A,Element)) og
split(Element,Hale1,L,Hale2).
split(Element,<>,<>,<>).
orden(A,B) hvis
A < B.
«eof»