<commit_before>module Problem061 where 

import Data.List

main = 
  print $ concatMap evolve (permutations pairs)

pairs :: [[(Int, Int)]]
pairs = map f [ (\n -> n * (n + 1) `div` 2)
              , (\n -> n * n)
              , (\n -> n * (3 * n - 1) `div` 2)
              , (\n -> n * (2 * n - 1))
              , (\n -> n * (5 * n - 3) `div` 2)
              , (\n -> n * (3 * n - 2))
              ]
  where f gen = map (`quotRem` 100) $ takeWhile (< 10000) $ dropWhile (< 1000) $ map gen [1 ..]
<commit_msg>problem 61 solved<commit_after>module Problem061 where 

import Data.List

main = 
  print $ concatMap evolve (permutations' pairs)

permutations' (p:ps) = map (p:) (permutations ps)

pairs :: [[(Int, Int)]]
pairs = map f [ (\n -> n * (n + 1) `div` 2)
              , (\n -> n * n)
              , (\n -> n * (3 * n - 1) `div` 2)
              , (\n -> n * (2 * n - 1))
              , (\n -> n * (5 * n - 3) `div` 2)
              , (\n -> n * (3 * n - 2))
              ]
  where f gen = map (`quotRem` 100) $ takeWhile (< 10000) $ dropWhile (< 1000) $ map gen [1 ..]

{'fraction_non_alphanumeric': 0.20202952029520296, 'fraction_numerical': 0.05350553505535055, 'mean_word_length': 1.4715261958997723, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5859783', 'n_tokens_mistral': 458, 'n_tokens_neox': 397, 'n_words': 134}