Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;#lang racket
- (define-struct
- cel
- (imei marca color))
- (define-struct
- marca
- (samsung lg xiaomi))
- (define-struct
- color
- (amarillo negro rojo))
- (define cel1 (make-cel 123456789 (make-marca 'A50 'K39 'MI9) (make-color 'si 'no 'si)))
- ;(marca-samsung (cel-marca cel1))
- (define (cambiar-color opcion etruct dato)
- (cond
- [(= opcion 1) (make-cel (cel-imei etruct)
- (cel-marca etruct)
- (make-color (cel-color etruct) (color-negro (cel-color etruct)) (color-rojo (cel-color etruct))))]
- )
- )
- (cambiar-color 1 cel1 'no)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement