Jump to content

Burrows–Wheeler transform: Difference between revisions

→‎{{header|TXR}}: Replace collect-each in bwt with mapcar.
(→‎{{header|TXR}}: Shorter code, particularly ibwt; sanity check in bwt.)
(→‎{{header|TXR}}: Replace collect-each in bwt with mapcar.)
Line 2,670:
(error "~s: input may not contain ~a" %fun% eof))
(let* ((seof `@str@eof`))
(flow (collect-each ((i 0..(len seof) (mapcar (op rot seof)) sort (mappend last))))
(rot seof i))
sort
(mappend last))))
 
(defun ibwt (str)
543

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.