# SICP Solutions

### Chapter 4, Metalinguistic Abstraction

#### Exercise 4.49

The main thing to notice is we need to have some dummy input. Else, we get stuck in a loop where sentence are generated by just appending a same preposition clause!

The dummy input can be used to make sure that our sentence won’t get past this dummy input length and thus when that length reaches, amb tries for other words and thus we get different sentences.

Here goes the code:

Output:

3 length input:

6 length input: