<commit_before><!doctype html>
<html>
  <head>
    <title>Clicky Evaluation</title>
    <meta charset="utf8">
    <link rel="stylesheet" href="style.css" charset="utf-8">
  </head>
  <body>
  <a href="https://github.com/stefankoegel/clickyEvaluation"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
    <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
    <script charset="utf-8" src="dist/Main.js"></script>
    <script charset="utf-8">
      PS.Main.main();
    </script>

    <div id="info"></div>

    <h3>Expression</h3>
    <input type="text" id="input" size="120" value="sum (map (^2) [1, 2, 3, 4])">

    <div id="output-container">
    </div>

    <div id="history-container">
    </div>

    <h3>Definitions</h3>
    <textarea id="definitions" cols="120" rows="15">
and (True:xs) = and xs
and _         = False

or (False:xs) = or xs
or _          = True

all p = and . map p
any p = or . map p

head (x:xs) = x
tail (x:xs) = xs

take 0 xs     = []
take n (x:xs) = x : take (n - 1) xs

drop 0 xs     = xs
drop n (x:xs) = drop (n - 1) xs

elem e []     = False
elem e (x:xs) = if e == x then True else elem e xs

max a b = if a >= b then a else b
min a b = if b >= a then a else b

maximum (x:xs) = foldr max x xs
minimum (x:xs) = foldr min x xs

length []     = 0
length (x:xs) = 1 + length xs

zip (x:xs) (y:ys) = (x, y) : zip xs ys
zip _      _      = []

zipWith f (x:xs) (y:ys) = f x y : zipWith f xs ys
zipWith _ _      _      = []

unzip []          = ([], [])
unzip ((a, b):xs) = (\(as, bs) -> (a:as, b:bs)) $ unzip xs

curry f a b = f (a, b)
uncurry f (a, b) = f a b


sum (x:xs) = x + sum xs
sum [] = 0

product (x:xs) = x * product xs
product [] = 1

reverse []     = []
reverse (x:xs) = reverse xs ++ [x]

concat = foldr (++) []

map f []     = []
map f (x:xs) = f x : map f xs

not True  = False
not False = True

filter p (x:xs) = if p x then x : filter p xs else filter p xs
filter p []     = []

foldr f ini []     = ini<commit_msg>Use less wildcards in the prelude<commit_after><!doctype html>
<html>
  <head>
    <title>Clicky Evaluation</title>
    <meta charset="utf8">
    <link rel="stylesheet" href="style.css" charset="utf-8">
  </head>
  <body>
  <a href="https://github.com/stefankoegel/clickyEvaluation"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
    <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
    <script charset="utf-8" src="dist/Main.js"></script>
    <script charset="utf-8">
      PS.Main.main();
    </script>

    <div id="info"></div>

    <h3>Expression</h3>
    <input type="text" id="input" size="120" value="sum (map (^2) [1, 2, 3, 4])">

    <div id="output-container">
    </div>

    <div id="history-container">
    </div>

    <h3>Definitions</h3>
    <textarea id="definitions" cols="120" rows="15">
and (True:xs)  = and xs
and (False:xs) = False
and []         = False

or (False:xs) = or xs
or (True:xs)  = True
or []         = True

all p = and . map p
any p = or . map p

head (x:xs) = x
tail (x:xs) = xs

take 0 xs     = []
take n (x:xs) = x : take (n - 1) xs

drop 0 xs     = xs
drop n (x:xs) = drop (n - 1) xs

elem e []     = False
elem e (x:xs) = if e == x then True else elem e xs

max a b = if a >= b then a else b
min a b = if b >= a then a else b

maximum (x:xs) = foldr max x xs
minimum (x:xs) = foldr min x xs

length []     = 0
length (x:xs) = 1 + length xs

zip (x:xs) (y:ys) = (x, y) : zip xs ys
zip []      _     = []
zip _       []    = []

zipWith f (x:xs) (y:ys) = f x y : zipWith f xs ys
zipWith _ []     _      = []
zipWith _ _      []     = []

unzip []          = ([], [])
unzip ((a, b):xs) = (\(as, bs) -> (a:as, b:bs)) $ unzip xs

curry f a b = f (a, b)
uncurry f (a, b) = f a b


sum (x:xs) = x + sum xs
sum [] = 0

product (x:xs) = x * product xs
product [] = 1

reverse []     = []
reverse (x:xs) = reverse xs ++ [x]

concat = foldr (++) []

map f []     = []
map f (x:xs) = f x : map f xs

not True  = False
not False = True

filter p (x:xs) = if p x then x : filter p xs else filter p xs
filter p []     = []

foldr f ini []     = ini
{'fraction_non_alphanumeric': 0.17587939698492464, 'fraction_numerical': 0.0745393634840871, 'mean_word_length': 2.85241935483871, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 69, 'https://': 8, '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': '456169', 'n_tokens_mistral': 2243, 'n_tokens_neox': 1970, 'n_words': 556}