Burrows–Wheeler transform: Difference between revisions
→{{header|TXR}}: Shorter code, particularly ibwt; sanity check in bwt.
(→{{header|TXR}}: New section.) |
(→{{header|TXR}}: Shorter code, particularly ibwt; sanity check in bwt.) |
||
Line 2,667:
<syntaxhighlight lang="txrlisp">(defun bwt (str)
(
(error "~s: input may not
(flow (collect-each ((i 0..(len seof)))
(rot seof i))
sort
Line 2,675 ⟶ 2,676:
(defun ibwt (str)
(let* ((
(row (
(dotimes (i
(
▲ [(find-if (op ends-with "\xDC00") row) 0..-1]))</syntaxhighlight>
At the REPL:
|