;; Dribble of # started on NIL. # [135]> (defun testlet (x y) (* (+ x y) (+ x y))) TESTLET [136]> (testlet 4 5) 81 [137]> (defun testlet (x y) (let (z (+ x y)) (* z z))) TESTLET [138]> (testlet 4 5) *** - LET: illegal variable specification (+ X Y) The following restarts are available: USE-VALUE :R1 Input a value to be used instead. ABORT :R2 Abort main loop Break 1 [139]> abort [140]> (defun testlet (x y) (let ((z (+ x y)) (w (- x y)) (* z z w w))) ) TESTLET [141]> (testlet 4 5) *** - LET: illegal variable specification (* Z Z W W) The following restarts are available: USE-VALUE :R1 Input a value to be used instead. ABORT :R2 Abort main loop Break 1 [142]> abort [143]> (defun testlet (x y) (let ((z (+ x y)) (w (- x y))) (* z z w w)) ) TESTLET [144]> (testlet 4 5) 81 [145]> (defun testlet (x y) (let ((z (+ x y))) (* z z)) ) TESTLET [146]> (testlet 4 5) 81 [147]> (time (+ 3 4)) Real time: 0.0 sec. Run time: 0.0 sec. Space: 0 Bytes 7 [148]> (defun fact (x) (if (equal 1 x) 1 (* x (fact (1- x))))) FACT [149]> (fact 10) 3628800 [150]> (fact 20) 2432902008176640000 [151]> (fact 40) 815915283247897734345611269596115894272000000000 [152]> (fact 400) 64034522846623895262347970319503005850702583026002959458684445942802397169186831436278478647463264676294350575035856810848298162883517435228961988646802997937341654150838162426461942352307046244325015114448670890662773914918117331955996440709549671345290477020322434911210797593280795101545372667251627877890009349763765710326350331533965349868386831339352024373788157786791506311858702618270169819740062983025308591298346162272304558339520759611505302236086810433297255194852674432232438669948422404232599805551610635942376961399231917134063858996537970147827206606320217379472010321356624613809077942304597360699567595836096158715129913822286578579549361617654480453222007825818400848436415591229454275384803558374518022675900061399560145595206127211192918105032491008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [153]> (time (fact 400)) Real time: 0.001 sec. Run time: 0.0 sec. Space: 69144 Bytes 64034522846623895262347970319503005850702583026002959458684445942802397169186831436278478647463264676294350575035856810848298162883517435228961988646802997937341654150838162426461942352307046244325015114448670890662773914918117331955996440709549671345290477020322434911210797593280795101545372667251627877890009349763765710326350331533965349868386831339352024373788157786791506311858702618270169819740062983025308591298346162272304558339520759611505302236086810433297255194852674432232438669948422404232599805551610635942376961399231917134063858996537970147827206606320217379472010321356624613809077942304597360699567595836096158715129913822286578579549361617654480453222007825818400848436415591229454275384803558374518022675900061399560145595206127211192918105032491008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [154]> (time (fact 4000)) Real time: 0.014 sec. Run time: 0.0 sec. Space: 0 Bytes [155]> (time (fact 2000)) Real time: 0.05 sec. Run time: 0.0468003 sec. Space: 2223260 Bytes GC: 4, GC time: 0.0312002 sec. 331627509245063324117539338057632403828111720810578039457193543706038077905600822400273230859732592255402352941225834109258084817415293796131386633526343688905634058556163940605117252571870647856393544045405243957467037674108722970434684158343752431580877533645127487995436859247408032408946561507233250652797655757179671536718689359056112815871601717232657156110004214012420433842573712700175883547796899921283528996665853405579854903657366350133386550401172012152635488038268152152246920995206031564418565480675946497051552288205234899995726450814065536678969532101467622671332026831552205194494461618239275204026529722631502574752048296064750927394165856283531779574482876314596450373991327334177263608852490093506621610144459709412707821313732563831572302019949914958316470942774473870327985549674298608839376326824152478834387469595829257740574539837501585815468136294217949972399813599481016556563876034227312912250384709872909626622461971076605931550201895135583165357871492290916779049702247094611937607785165110684432255905648736266530377384650390788049524600712549402614566072254136302754913671583406097831074945282217490781347709693241556111339828051358600690594619965257310741177081519922564516778571458056602185654760952377463016679422488444485798349801548032620829890965857381751888619376692828279888453584639896594213952984465291092009103710046149449915828588050761867924946385180879874512891408019340074625920057098729578599643650655895612410231018690556060308783629110505601245908998383410799367902052076858669183477906558544700148692656924631933337612428097420067172846361939249698628468719993450393889367270487127172734561700354867477509102955523953547941107421913301356819541091941462766417542161587625262858089801222443890248677182054959415751991701271767571787495861619665931878855141835782092601482071777331735396034304969082070589958701381980813035590160762908388574561288217698136182483576739218303118414719133986892842344000779246691209766731651433494437473235636572048844478331854941693030124531676232745367879322847473824485092283139952509732505979127031047683601481191102229253372697693823670057565612400290576043852852902937606479533458179666123839605262549107186663869354766108455046198102084050635827676526589492393249519685954171672419329530683673495544004586359838161043059449826627530605423580755894108278880427825951089880635410567917950974017780688782869810219010900148352061688883720250310665922068601483649830532782088263536558043605686781284169217133047141176312175895777122637584753123517230990549829210134687304205898014418063875382664169897704237759406280877253702265426530580862379301422675821187143502918637636340300173251818262076039747369595202642632364145446851113427202150458383851010136941313034856221916631623892632765815355011276307825059969158824533457435437863683173730673296589355199694458236873508830278657700879749889992343555566240682834763784685183844973648873952475103224222110561201295829657191368108693825475764118886879346725191246192151144738836269591643672490071653428228152661247800463922544945170363723627940757784542091048305461656190622174286981602973324046520201992813854882681951007282869701070737500927666487502174775372742351508748246720274170031581122805896178122160747437947510950620938556674581252518376682157712807861499255876132352950422346387878954850885764466136290394127665978044202092281337987115900896264878942413210454925003566670632909441579372986743421470507213588932019580723064781498429522595589012754823971773325722910325760929790733299545056388362640474650245080809469116072632087494143973000704111418595530278827357654819182002449697761111346318195282761590964189790958117338627206088910432945244978535147014112442143055486089639578378347325323595763291438925288393986256273242862775563140463830389168421633113445636309571965978466338551492316196335675355138403425804162919837822266909521770153175338730284610841886554138329171951332117895728541662084823682817932512931237521541926970269703299477643823386483008871530373405666383868294088487730721762268849023084934661194260180272613802108005078215741006054848201347859578102770707780655512772540501674332396066253216415004808772403047611929032210154385353138685538486425570790795341176519571188683739880683895792743749683498142923292196309777090143936843655333359307820181312993455024206044563340578606962471961505603394899523321800434359967256623927196435402872055475012079854331970674797313126813523653744085662263206768837585132782896252333284341812977624697079543436003492343159239674763638912115285406657783646213911247447051255226342701239527018127045491648045932248108858674600952306793175967755581011679940005249806303763141344412269037034987355799916009259248075052485541568266281760815446308305406677412630124441864204108373119093130001154470560277773724378067188899770851056727276781247198832857695844217588895160467868204810010047816462358220838532488134270834079868486632162720208823308727819085378845469131556021728873121907393965209260229101477527080930865364979858554010577450279289814603688431821508637246216967872282169347370599286277112447690920902988320166830170273420259765671709863311216349502171264426827119650264054228231759630874475301847194095524263411498469508073390080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [156]> (print 4) 4 4 [157]> (defun avg3 (ls) (print ls) (cond ((null ls) 0) ((equal 1 (length ls)) (car ls)) ((equal 2 (length ls)) (/ (+ (car ls) (cadr ls)) 2)) (t (/ (+ (car ls) (cadr ls) (caddr ls)) 3)) ) ) AVG3 [158]> (avg3 '(4 5 6 11 234)) (4 5 6 11 234) 5 [159]> nil NIL [160]> (print '( 4 5 6)) (4 5 6) (4 5 6) [161]> (print "sefpsgjposgdk") "sefpsgjposgdk" "sefpsgjposgdk" [162]> (machine-type) "PC/386" [163]> (+ (read) (read)) 4 5 9 [164]> (+ (print "first number:")(read) (print "second number:")(read)) "first number:" 3 "second number:" 4 *** - +: "first number:" is not a number The following restarts are available: USE-VALUE :R1 Input a value to be used instead. ABORT :R2 Abort main loop Break 1 [165]> (+ (print '"first number:")(read) (print '"second number:")(read)) "first number:" 4 "second number:" 5 *** - +: "first number:" is not a number The following restarts are available: USE-VALUE :R1 Input a value to be used instead. ABORT :R2 Abort debug loop ABORT :R3 Abort main loop Break 2 [166]> abort Break 1 [165]> (+ (print '|first number:|)(read) (print '|second number:|)(read)) |first number:| a |second number:| 4 *** - +: |first number:| is not a number The following restarts are available: USE-VALUE :R1 Input a value to be used instead. ABORT :R2 Abort debug loop ABORT :R3 Abort main loop Break 2 [167]> abort Break 1 [165]> abort [168]> (+ (print 'n1)(read) (read)) N1 3 4 *** - +: N1 is not a number The following restarts are available: USE-VALUE :R1 Input a value to be used instead. ABORT :R2 Abort main loop Break 1 [169]> abort [170]> (+ (read) (read)) 5 6 11 [171]> (let ((x (print "first number:"))) (+ (read) (read))) "first number:" 2 3 5 [172]> (let ((x (print "first number:"))) (+ (read)) (let ((y (print "second number:"))) (read)))) "first number:" 4 "second number:" 5 5 [173]> *** - READ from # # #> # #>>> : an object cannot start with #\) The following restarts are available: ABORT :R1 Abort main loop Break 1 [174]> abort [175]> (+ (let ((x (print "first number:"))) (read)) (let ((y (print "second number:"))) (read)))) "first number:" 4 "second number:" 55 59 [176]> *** - READ from # # #> # #>>> : an object cannot start with #\) The following restarts are available: ABORT :R1 Abort main loop Break 1 [177]> abort [178]> (mapcar #'(lambda (x) (/ 1 (sqrt x))) '(1 2 3 4 5)) (1 0.70710677 0.57735026 1/2 0.4472136) [179]> (mapcar #'(lambda (x) (/ 1 (* x x))) '(1 2 3 4 5)) (1 1/4 1/9 1/16 1/25) [180]> (mapcar #'(lambda (x) (/ 1 (* x x x))) '(1 2 3 4 5)) (1 1/8 1/27 1/64 1/125) [181]> (dribble) 2009-06-24 21:35:34 ;; Dribble of # finished on NIL.