f(x) = 3 x - x^(2)
A = Point(xAxis)
numIterations = 23 (slider from 1 to 50, step 1)
values = IterationList(f, x(A), numIterations)
b = Segment(A, (x(A), f(x(A))))
cobwebHorizontal = Sequence(Segment[(Element[values, i], Element[values, i + 1]), (Element[values, i + 1], Element[values, i + 1])], i, 1, numIterations)
cobwebVertical = Sequence(Segment[(Element[values, i], Element[values, i]), (Element[values, i], Element[values, i + 1])], i, 2, numIterations)