/[guile]/guile/guile-core/doc/tutorial/guile-tut.texi
ViewVC logotype

Diff of /guile/guile-core/doc/tutorial/guile-tut.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.2.7 by ossau, Tue Jul 16 21:00:30 2002 UTC revision 1.3.2.8 by ossau, Sat Sep 27 10:10:24 2003 UTC
# Line 523  guile> @kbd{(caddr ls)} Line 523  guile> @kbd{(caddr ls)}
523  guile> @kbd{(append ls (list 8 9 10))}  guile> @kbd{(append ls (list 8 9 10))}
524         @result{} (1 2 3 4 5 6 7 8 9 10)         @result{} (1 2 3 4 5 6 7 8 9 10)
525  guile> @kbd{(reverse ls)}  guile> @kbd{(reverse ls)}
526         @result{} (10 9 8 7 6 5 4 3 2 1)         @result{} (7 6 5 4 3 2 1)
527  ;; @r{ask if 12 is in the list --- it obviously is not}  ;; @r{ask if 12 is in the list --- it obviously is not}
528  guile> @kbd{(memq 12 ls)}  guile> @kbd{(memq 12 ls)}
529         @result{} #f         @result{} #f
# Line 552  guile> @kbd{(map sin ls2)} Line 552  guile> @kbd{(map sin ls2)}
552         @result{} (0.909297426825682 0.141120008059867 -0.756802495307928)         @result{} (0.909297426825682 0.141120008059867 -0.756802495307928)
553  ;; @r{make a list in which the squaring function has been}  ;; @r{make a list in which the squaring function has been}
554  ;; @r{applied to all elements of @code{ls}}  ;; @r{applied to all elements of @code{ls}}
555  guile> @kbd{(map (lambda (n) (expt n n)) ls)}  guile> @kbd{(map (lambda (n) (* n n)) ls)}
556         @result{} (1 4 27 256 3125 46656 823543)         @result{} (1 4 9 16 25 36 49)
557  @end smalllisp  @end smalllisp
558    
559  @smalllisp  @smalllisp

Legend:
Removed from v.1.3.2.7  
changed lines
  Added in v.1.3.2.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26