Move-to-front algorithm: Difference between revisions

m
→‎{{header|Haskell}}: ( Expanded the check at the end to a pointedl form for more direct legibility )
(→‎{{header|Haskell}}: + 'check to ensure that the decoded string is the same as the original' + hlint, hindent)
m (→‎{{header|Haskell}}: ( Expanded the check at the end to a pointedl form for more direct legibility ))
Line 841:
main =
mapM_ print $
(,) <*> uncurry(\x -> ((==)fst . fst) x == snd x) <$>
((,) <*> (decode . snd) <$>
((,) <*> encode <$> ["broood", "bananaaa", "hiphophiphop"]))</lang>
9,655

edits