Changeset 36916 in project


Ignore:
Timestamp:
11/24/18 22:46:23 (2 weeks ago)
Author:
sjamaan
Message:

Add missing import in CHICKEN for Ruby programmers example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/chicken-for-ruby-programmers

    r36899 r36916  
    560560  (filter even? '(1 2 3 4 5 6))
    561561  (2 4 6)
    562   #;7> ;; [1, 2, 3, 4].inject(""){|str, x| str + x.to_s}
     562  #;7> (import (chicken string)) ;; To get the conc procedure
     563  #;8> ;; [1, 2, 3, 4].inject(""){|str, x| str + x.to_s}
    563564  (fold (lambda (x str) (conc str x)) "" '(1 2 3 4))
    564565  "1234"
     
    611612
    612613<enscript highlight=scheme>
     614  (import (chicken string)) ;; To get the conc procedure
    613615  (define x 10)
    614616  (define y (sprintf "x contains ~A" x))
Note: See TracChangeset for help on using the changeset viewer.