9 lines
307 B
Plaintext
9 lines
307 B
Plaintext
fcn prettyPrint(m){ // m is a list of lists
|
|
fmt:=("%3d "*m.len() + "\n").fmt;
|
|
m.pump(String,'wrap(col){ fmt(col.xplode()) });
|
|
}
|
|
const N=5;
|
|
println("Upper:\n", pascal_upp(N):prettyPrint(_));
|
|
println("Lower:\n", pascal_low(N):prettyPrint(_));
|
|
println("Symmetric:\n",pascal_sym(N):prettyPrint(_));
|