late 14c., "a fold or doubling of cloth, rope, leather, cord, etc.," of uncertain origin. OED favors a Celtic origin (compare Gaelic lub "bend," Irish lubiam), which in English was perhaps influenced by or blended with Old Norse hlaup "a leap, run" (see leap (v.)). As a feature of a fingerprint, 1880. In reference to magnetic recording tape or film, first recorded 1931. Computer programming sense "sequence of instructions executed repeatedly" first attested 1947.