Welcome to the CHICKEN Scheme pasting service

no title added by panico on Wed May 1 15:14:38 2019

(import                                                                         
  (chicken random)                                                              
  srfi-18                                                                       
  (prefix sdl2 "sdl2:"))                                                        
                                                                                
; (cond-expand (csi (import live-define)) (else))                               
                                                                                
(define (random-color)                                                          
  (sdl2:make-color                                                              
    (pseudo-random-integer 255)                                                 
    (pseudo-random-integer 255)                                                 
    (pseudo-random-integer 255)))                                               
                                                                                
(define bg-color (sdl2:make-color 222 0 222))                                   
                                                                                
(define (paint-background)                                                      
  (sdl2:fill-rect! (sdl2:window-surface window)                                 
                   #f                                                           
                   bg-color))                                                   
                                                                                
(define (update-window)                                                         
  (sdl2:update-window-surface! window))                                         
                                                                                
(sdl2:set-main-ready!)                                                          
(sdl2:init! '(video))                                                           
(define window (sdl2:create-window! "Hello, World!" 0 0 600 400))               
(paint-background)                                                              
(update-window)                                                                 
                                                                                
(define (main)                                                                  
  (paint-background)                                                            
  (update-window)                                                               
  (main))                                                                       
                                                                                
(define game-thread (thread-start! main))                                       
                                                                                
(cond-expand ((or chicken-script compiling) (thread-join! game-thread))         
             (else))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What type of object does `map' expect as second argument?
Visually impaired? Let me spell it for you (wav file) download WAV