### Related

##### buildq-lambda-makelist

arr: makelist(ii,ii,1...

g: buildq([b:2],lambd...

Calculate

##### buildq-exp-freeof-lambda-polynomialp

polynomialp(a*x^2+b*x...

Calculate

##### buildq

a:[1, 2, 3, 4];

for m in a do print(m);

for m in a do for l i...

Calculate

##### buildq-return

a:[1, 2, 3, 4];

for m in a do print(m);

for m in a do for l i...

Calculate

##### buildq-freeof-lambda

f:buildq([bb:y],lambd...

f(bb*x^2);

Calculate

##### buildq-exp-freeof-lambda-polynomialp

f:buildq([bb:y],lambd...

f(bb*x^2);

polynomialp(a*x^2+b*x...

Calculate

##### buildq-indices-lambda-makelist-sublist_indices

arr: makelist(ii,ii,1...

g: buildq([b:2],lambd...

sublist_indices(arr,b...

Calculate

##### buildq-indices-lambda-macroexpand-sublist_indices

gensym();

f(l, x) ::= buildq([l...

macroexpand(f([x,y,z]...

Calculate

##### buildq-freeof-lambda-polynomialp

f:buildq([bb:x],lambd...

f(bb*x^2);

polynomialp(a*x^2+b*x...

Calculate

##### buildq-freeof-lambda

f:buildq([bb:y],lambd...

f(bb*x^2);

Calculate

### buildq

Run Example
```(%i1)show(L)::=block([simp:false], simp:false, buildq([L], first([L[1]/L[2]])));
L
1
(%o1) show(L) ::= block([simp : false], simp : false, buildq([L], first([--])))
L
2
(%i2) show([0, 1]), simp:false;
0
(%o2)                                  -
1
(%i3) L:[0, 1];
(%o3)                               [0, 1]
(%i4)  R:[1, 0];
(%o4)                               [1, 0]
(%i5) k:[L, L+R, R];
(%o5)                      [[0, 1], [1, 1], [1, 0]]
(%i6) show(L), simp:false;
0
(%o6)                                  -
1
(%i7) show(R), simp:false;
1
(%o7)                                  -
0
(%i8) show(L+R), simp:false;
1
(%o8)                                  -
1
(%i9) h:[];
(%o9)                                 []
(%i10) block([m:[]], for i in k do (append(m, [show(i)]), return(m))), simp:false;
(%o10)                                []
(%i11) ```
Run Example
```seq(start,stop,stepping,[shift]) := block([                                            n, y:[],                                             shift: (if (not(emptyp(shift)))                                                         then float(first(shift))                                                            else (0.0))                                            ],            (n:floor((float(stop-start)/float(stepping)))),            (if (start <
stop)            then            (y:flatten(append([y],                                         makelist(float(start+shift+(stepping*(i-start))),                                         i, start, n+start))))            else            (y:flatten(append([y],                                         makelist(-(float(stop-shift-(stepping*(i-stop)))),                                         i, -(n+stop), stop)))))            (if (n>
1.0)                then return(y)                else return([])));
(%o1) seq(start, stop, stepping, [shift]) :=
block([n, y : [], shift : if not emptyp(shift) then float(first(shift))
float(stop - start)
else 0.0], n : floor(-------------------),
float(stepping)
if start < stop then y : flatten(append([y],
makelist(float(start + shift + stepping (i - start)), i, start, n + start)))
else y : flatten(append([y], makelist(- float(stop - shift
- stepping (i - stop)), i, - (n + stop), stop)))(if n > 1.0 then return(y)
else return([])))
(%i2) kill(pairs);
(%o2)                                done
(%i3) pairs(items):=block([result],result:if (emptyp(items)) then [] elseif (listp(items)) then     if(emptyp(rest(items))) then cons(last(items), []) else    cons(cons(first(items),  [second(items)]),                     [pairs(rest(rest(items)))]));
(%o3) pairs(items) := block([result], result :
if emptyp(items) then [] elseif listp(items)
then (if emptyp(rest(items)) then cons(last(items), [])
else cons(cons(first(items), [second(items)]), [pairs(rest(rest(items)))])))
(%i4) pairs([1, 2, 3, 4, 5]);
(%o4)                       [[1, 2], [[3, 4], [5]]]
(%i5) kill(pairs);
(%o5)                                done
(%i6) pairs(items):=block([result],result:if (emptyp(items)) then [] elseif (listp(items)) then     if(emptyp(rest(items))) then [last(items), []] else    cons(cons(first(items),  [second(items)]),                     [pairs(rest(rest(items)))]));
(%o6) pairs(items) := block([result], result :
if emptyp(items) then [] elseif listp(items)
then (if emptyp(rest(items)) then [last(items), []]
else cons(cons(first(items), [second(items)]), [pairs(rest(rest(items)))])))
(%i7) pairs([1, 2, 3, 4, 5]);
(%o7)                     [[1, 2], [[3, 4], [5, []]]]
(%i8) first(pairs(seq(1, 10, 1)));
(%o8)                             [1.0, 2.0]
(%i9) test(list):=buildq([m: first(list), n:second(list)],            find_root(sin(x), x, m, n));
(%o9) test(list) := buildq([m : first(list), n : second(list)],
find_root(sin(x), x, m, n))
(%i10) test(first(pairs(seq(1, 10, 1)))), ev;
(%o10)                  find_root(sin(x), x, 1.0, 2.0)
(%i11) find_root(sin(x), x, 0, %pi);
(%o11)                                0.0
(%i12) ```
Run Example
```show(L)::=block(simp:false, block(buildq([L], first([L[1]/L[2]]))));
L
1
(%o1)  show(L) ::= block(simp : false, block(buildq([L], first([--]))))
L
2
(%i2) L:[0, 1];
(%o2)                               [0, 1]
(%i3) R:[1, 0];
(%o3)                               [1, 0]
(%i4) k:[L, L+R, R];
(%o4)                      [[0, 1], [1, 1], [1, 0]]
(%i5) h:[L, 2*L+R, L+R, L+2*R, R];
(%o5)              [[0, 1], [1, 2], [1, 1], [2, 1], [1, 0]]
(%i6) n:[L, 3*L+R, 2*L+R, L+R, L+2*R, L+3*R, R];
(%o6)      [[0, 1], [1, 3], [1, 2], [1, 1], [2, 1], [3, 1], [1, 0]]
(%i7) show(L);
0
(%o7)                                  -
1
(%i8) show(R);
1
(%o8)                                  -
0
(%i9) map(showm, (L+R));
(%o9)                    showm([0, 1]) + showm([1, 0])
(%i10) block([m:[]], for i in k do (m:append(m, [show(i)])), return(m));
0  1  1
(%o10)                             [-, -, -]
1  1  0
(%i11) block([m:[]], for i in h do (m:append(m, [show(i)])), return(m));
0  1  1  2  1
(%o11)                          [-, -, -, -, -]
1  2  1  1  0
(%i12) block([m:[]], for i in n do (m:append(m, [show(i)])), return(m));
0  1  1  1  2  3  1
(%o12)                       [-, -, -, -, -, -, -]
1  3  2  1  1  1  0
(%i13) ```

Help for Buildq