First, there's some extraneous code in my-cons
which doesn't seem to belong here. This is enough:
(define my-cons
(lambda (x y)
(lambda (a)
(if a x y))))
(Also, you don't need to compare a boolean value with #t
or #f
— it's usable in if
as it is.)
Now you have my-cons
that returns a function which returns either x
or y
depending on its arugment. You can use that when implementing my-car
and my-cdr
:
(define my-car
(lambda (c)
(c #t)))
(define my-cdr
(lambda (c)
(c #f)))