Skip to content
Extraits de code Groupes Projets
Valider c17f6565 rédigé par Nicolas Verbois's avatar Nicolas Verbois
Parcourir les fichiers

Upload New File

parent 8ab64e1e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#lang r5rs
(define (point x y)
(define (dispatch m)
(cond ((eq? m 'getx) x)
((eq? m 'gety) y)
((eq? m 'type) 'point)
((eq? m 'info) (list (dispatch 'type) (dispatch 'getx) (dispatch 'gety) ))
(else (display "ERROR"))))
dispatch)
(define p (point 1 2))
(display (p 'getx))
(newline)
(display (p 'gety))
(newline)
(display (p 'type))
(newline)
(display (p 'info))
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter