this will help I am trying to implement a function (my-filter p lst) by using lambda, map and foldr. , First we need to see how foldr works.

code :

```
(foldr k e '(1 2 3))
= (k 1 (k 2 (k 3 e)))
```

```
(foldr cons empty '(1 2 3))
= (cons 1 (cons 2 (cons 3 empty)))
= (list 1 2 3)
```

```
(define (kons x xs)
(if (p x) ; where p is the predicate
(cons x xs)
xs))
```

```
(foldr kons empty '(1 2 3))
```

```
#lang racket
(define p odd?)
(define (kons x xs)
(if (p x)
(cons x xs)
xs))
(foldr kons empty '(1 2 3 4 5 6))
```

```
'(1 3 5)
```

```
(define (my-filter p xs)
(define (kons x xs) ...)
(foldr ...))
```