To knock down or out with a blow of the fist.

- american underworld dictionary - 1950

To produce the list of leaves of a tree. Note that in-order traversal, pre-order traversal and post-order traversal all produce the same flattened list of leaves, so it doesn't matter which we pick.

(In Lisp, Scheme is a little different):

(defun flatten (l)
  (cond
   ((null l) nil)
   ((atom l) (list l))
   (t (append (flatten (car l)) (flatten (cdr l))))))
Note that this is not particularly efficient; in fact, the repeated use of append is terrible!

flat-file = F = flavor

flatten vt.

[common] To remove structural information, esp. to filter something with an implicit tree structure into a simple sequence of leaves; also tends to imply mapping to flat-ASCII. "This code flattens an expression with parentheses into an equivalent canonical form."

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.

Flat"ten (?), v. t. [imp. & p. p. Flattened (?); p. pr. & vb. n. Flattening.] [From Flat, a.]

1.

To reduce to an even surface or one approaching evenness; to make flat; to level; to make plane.

2.

To throw down; to bring to the ground; to prostrate; hence, to depress; to deject; to dispirit.

3.

To make vapid or insipid; to render stale.

4. Mus.

To lower the pitch of; to cause to sound less sharp; to let fall from the pitch.

To flatten a sail Naut., to set it more nearly fore-and-aft of the vessel. -- Flattening oven, in glass making, a heated chamber in which split glass cylinders are flattened for window glass.

 

© Webster 1913.


Flat"ten, v. i.

To become or grow flat, even, depressed dull, vapid, spiritless, or depressed below pitch.

 

© Webster 1913.

Log in or register to write something here or to contact authors.