/usr/share/axiom-20170501/input/spadcall.input is in axiom-test 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | )set break resume
)sys rm -f spadcall.output
)spool spadcall.output
)set message test on
)set message auto off
)clear all
--S 1 of 14
)show LIST(FRAC(INT))
--R
--R List(Fraction(Integer)) is a domain constructor.
--R Abbreviation for List is LIST
--R This constructor is exposed in this frame.
--R Issue )edit bookvol10.3.pamphlet to see algebra source code for LIST
--R
--R------------------------------- Operations --------------------------------
--R
--R #? : % -> NonNegativeInteger ?<? : (%,%) -> Boolean
--R ?<=? : (%,%) -> Boolean ?=? : (%,%) -> Boolean
--R ?>? : (%,%) -> Boolean ?>=? : (%,%) -> Boolean
--R OMwrite : (%,Boolean) -> String OMwrite : % -> String
--R append : (%,%) -> % child? : (%,%) -> Boolean
--R children : % -> List(%) coerce : % -> OutputForm
--R concat : List(%) -> % concat : (%,%) -> %
--R concat! : (%,%) -> % cons : (Fraction(Integer),%) -> %
--R convert : % -> InputForm copy : % -> %
--R copyInto! : (%,%,Integer) -> % cycleEntry : % -> %
--R cycleSplit! : % -> % cycleTail : % -> %
--R cyclic? : % -> Boolean delete : (%,Integer) -> %
--R delete! : (%,Integer) -> % distance : (%,%) -> Integer
--R ?.rest : (%,rest) -> % empty : () -> %
--R empty? : % -> Boolean eq? : (%,%) -> Boolean
--R explicitlyFinite? : % -> Boolean fill! : (%,Fraction(Integer)) -> %
--R first : % -> Fraction(Integer) hash : % -> SingleInteger
--R index? : (Integer,%) -> Boolean indices : % -> List(Integer)
--R insert : (%,%,Integer) -> % insert! : (%,%,Integer) -> %
--R last : % -> Fraction(Integer) last : (%,NonNegativeInteger) -> %
--R latex : % -> String leaf? : % -> Boolean
--R list : Fraction(Integer) -> % max : (%,%) -> %
--R maxIndex : % -> Integer merge : (%,%) -> %
--R merge! : (%,%) -> % min : (%,%) -> %
--R minIndex : % -> Integer nil : () -> %
--R node? : (%,%) -> Boolean nodes : % -> List(%)
--R null : % -> Boolean possiblyInfinite? : % -> Boolean
--R removeDuplicates : % -> % removeDuplicates! : % -> %
--R rest : (%,NonNegativeInteger) -> % rest : % -> %
--R reverse : % -> % reverse! : % -> %
--R sample : () -> % second : % -> Fraction(Integer)
--R setDifference : (%,%) -> % setIntersection : (%,%) -> %
--R setUnion : (%,%) -> % setchildren! : (%,List(%)) -> %
--R setelt : (%,rest,%) -> % setrest! : (%,%) -> %
--R sort : % -> % sort! : % -> %
--R sorted? : % -> Boolean split! : (%,Integer) -> %
--R swap! : (%,Integer,Integer) -> Void tail : % -> %
--R third : % -> Fraction(Integer) value : % -> Fraction(Integer)
--R ?~=? : (%,%) -> Boolean
--R OMwrite : (OpenMathDevice,%,Boolean) -> Void
--R OMwrite : (OpenMathDevice,%) -> Void
--R any? : ((Fraction(Integer) -> Boolean),%) -> Boolean
--R concat : (Fraction(Integer),%) -> %
--R concat : (%,Fraction(Integer)) -> %
--R concat! : (%,Fraction(Integer)) -> %
--R construct : List(Fraction(Integer)) -> %
--R count : (Fraction(Integer),%) -> NonNegativeInteger
--R count : ((Fraction(Integer) -> Boolean),%) -> NonNegativeInteger
--R cycleLength : % -> NonNegativeInteger
--R delete : (%,UniversalSegment(Integer)) -> %
--R delete! : (%,UniversalSegment(Integer)) -> %
--R ?.first : (%,first) -> Fraction(Integer)
--R ?.last : (%,last) -> Fraction(Integer)
--R ?.value : (%,value) -> Fraction(Integer)
--R elt : (%,Integer,Fraction(Integer)) -> Fraction(Integer)
--R ?.? : (%,Integer) -> Fraction(Integer)
--R ?.? : (%,UniversalSegment(Integer)) -> %
--R entries : % -> List(Fraction(Integer))
--R entry? : (Fraction(Integer),%) -> Boolean
--R eval : (%,Equation(Fraction(Integer))) -> %
--R eval : (%,Fraction(Integer),Fraction(Integer)) -> %
--R eval : (%,List(Equation(Fraction(Integer)))) -> %
--R eval : (%,List(Fraction(Integer)),List(Fraction(Integer))) -> %
--R every? : ((Fraction(Integer) -> Boolean),%) -> Boolean
--R find : ((Fraction(Integer) -> Boolean),%) -> Union(Fraction(Integer),"failed")
--R first : (%,NonNegativeInteger) -> %
--R insert : (Fraction(Integer),%,Integer) -> %
--R insert! : (Fraction(Integer),%,Integer) -> %
--R leaves : % -> List(Fraction(Integer))
--R less? : (%,NonNegativeInteger) -> Boolean
--R map : (((Fraction(Integer),Fraction(Integer)) -> Fraction(Integer)),%,%) -> %
--R map : ((Fraction(Integer) -> Fraction(Integer)),%) -> %
--R map! : ((Fraction(Integer) -> Fraction(Integer)),%) -> %
--R member? : (Fraction(Integer),%) -> Boolean
--R members : % -> List(Fraction(Integer))
--R merge : (((Fraction(Integer),Fraction(Integer)) -> Boolean),%,%) -> %
--R merge! : (((Fraction(Integer),Fraction(Integer)) -> Boolean),%,%) -> %
--R more? : (%,NonNegativeInteger) -> Boolean
--R new : (NonNegativeInteger,Fraction(Integer)) -> %
--R parts : % -> List(Fraction(Integer))
--R position : (Fraction(Integer),%,Integer) -> Integer
--R position : (Fraction(Integer),%) -> Integer
--R position : ((Fraction(Integer) -> Boolean),%) -> Integer
--R qelt : (%,Integer) -> Fraction(Integer)
--R qsetelt! : (%,Integer,Fraction(Integer)) -> Fraction(Integer)
--R reduce : (((Fraction(Integer),Fraction(Integer)) -> Fraction(Integer)),%,Fraction(Integer),Fraction(Integer)) -> Fraction(Integer)
--R reduce : (((Fraction(Integer),Fraction(Integer)) -> Fraction(Integer)),%,Fraction(Integer)) -> Fraction(Integer)
--R reduce : (((Fraction(Integer),Fraction(Integer)) -> Fraction(Integer)),%) -> Fraction(Integer)
--R remove : (Fraction(Integer),%) -> %
--R remove : ((Fraction(Integer) -> Boolean),%) -> %
--R remove! : (Fraction(Integer),%) -> %
--R remove! : ((Fraction(Integer) -> Boolean),%) -> %
--R select : ((Fraction(Integer) -> Boolean),%) -> %
--R select! : ((Fraction(Integer) -> Boolean),%) -> %
--R setelt : (%,first,Fraction(Integer)) -> Fraction(Integer)
--R setelt : (%,last,Fraction(Integer)) -> Fraction(Integer)
--R setelt : (%,value,Fraction(Integer)) -> Fraction(Integer)
--R setelt : (%,Integer,Fraction(Integer)) -> Fraction(Integer)
--R setelt : (%,UniversalSegment(Integer),Fraction(Integer)) -> Fraction(Integer)
--R setfirst! : (%,Fraction(Integer)) -> Fraction(Integer)
--R setlast! : (%,Fraction(Integer)) -> Fraction(Integer)
--R setvalue! : (%,Fraction(Integer)) -> Fraction(Integer)
--R size? : (%,NonNegativeInteger) -> Boolean
--R sort : (((Fraction(Integer),Fraction(Integer)) -> Boolean),%) -> %
--R sort! : (((Fraction(Integer),Fraction(Integer)) -> Boolean),%) -> %
--R sorted? : (((Fraction(Integer),Fraction(Integer)) -> Boolean),%) -> Boolean
--R
--R
--E 1
--S 2 of 14
b:=[1/2,1/3,1/4]
--R
--R
--R 1 1 1
--R (1) [-,-,-]
--R 2 3 4
--R Type: List(Fraction(Integer))
--E 2
--S 3 of 14
)lisp (setq a '((1 . 2) (1 . 3) (1 . 4)))
--R
--RValue = ((1 . 2) (1 . 3) (1 . 4))
--E 3
--S 4 of 14
third b
--R
--R
--R 1
--R (2) -
--R 4
--R Type: Fraction(Integer)
--E 4
--S 5 of 14
)lisp (setq f (|getFunctionFromDomain| '|third| '(|List| (|Fraction| (|Integer|))) '((|List| (|Fraction| (|Integer|))))))
--R
--IValue = (#<compiled-function |URAGG-;third;AS;5|> . #<vector 00663a88>)
--E 5
--S 5 of 14
)lisp (spadcall a f)
--R
--RValue = (1 . 4)
--E 6
--S 7 of 14
sort b
--R
--R
--R 1 1 1
--R (3) [-,-,-]
--R 4 3 2
--R Type: List(Fraction(Integer))
--E 7
--S 8 of 14
)lisp (setq f (|getFunctionFromDomain| '|sort| '(|List| (|Fraction| (|Integer|))) '((|List| (|Fraction| (|Integer|))))))
--R
--IValue = (#<compiled-function |FLAGG-;sort;2A;4|> . #<vector 006638a8>)
--E 8
and use {\tt spadcall} on our list of cons cells to return a sorted
list of cons cells.
--S 9 of 14
)lisp (spadcall a f)
--R
--RValue = ((1 . 4) (1 . 3) (1 . 2))
--E 9
--S 10 of 14
size?(b,2)
--R
--R
--R (4) false
--R Type: Boolean
--E 10
--S 11 of 14
)lisp (setq f (|getFunctionFromDomain| '|size?| '(|List| (|Fraction| (|Integer|))) '((|List| (|Fraction| (|Integer|))) (|NonNegativeInteger|))))
--R
--IValue = (#<compiled-function |URAGG-;size?;ANniB;14|> . #<vector 00663a88>)
--E 11
--S 12 of 14
)lisp (spadcall a 2 f)
--R
--RValue = NIL
--E 12
--S 13 of 14
size?(b,3)
--R
--R
--R (5) true
--R Type: Boolean
--E 13
--S 14 of 14
)lisp (spadcall a 3 f)
--R
--RValue = T
--E 14
)spool
)lisp (bye)
|