Move-to-front algorithm: Difference between revisions

→‎{{header|Haskell}}: 2nd thoughts re test: used point free form plus pointed expansion in comment
m (→‎{{header|Haskell}}: ( Expanded the check at the end to a pointedl form for more direct legibility ))
(→‎{{header|Haskell}}: 2nd thoughts re test: used point free form plus pointed expansion in comment)
Line 841:
main =
mapM_ print $
(,) <*> uncurry (\x(==) -. fst) <$> -- Test that ((fst . fst) x) == snd x) <$>
((,) <*> (decode . snd) <$>
((,) <*> encode <$> ["broood", "bananaaa", "hiphophiphop"]))</lang>
9,655

edits