<commit_before>
module Prelude where

import Native.Prelude as N

radians : Float -> Float
radians t = t

degrees : Float -> Float
degrees d = d * Math.PI / 180

turns : Float -> Float
turns r = 2 * Math.PI * r

(+) : Number a -> Number a -> Number a
(-) : Number a -> Number a -> Number a
(*) : Number a -> Number a -> Number a
(/) : Float -> Float -> Float

-- Integer division, remainder is discarded.
div : Int -> Int -> Int

-- Finds the remainder after dividing one number by another: 4 `rem` 3 == 1
rem : Int -> Int -> Int

-- Perform modular arithmetic: 7 `mod` 2 == 1
mod : Int -> Int -> Int

-- Basic functions of trigonometry.
cos  : Float -> Float
sin  : Float -> Float
tan  : Float -> Float
acos : Float -> Float
asin : Float -> Float
atan : Float -> Float

-- Returns the arctangent of the quotient of its arguments in radians.
-- So `atan2 y x` computes the angle from the positive x-axis to the vector
-- starting at the origin and ending at (x,y).
atan2 : Float -> Float -> Float

-- Take the square root of a number.
sqrt : Number a -> Number a

-- Take the absolute value of a number.
abs : Number a -> Number a

-- Calculate the logarithm of a number with a given base: `logBase 10 100 == 2`
logBase : Number a -> Number a -> Number a

-- Given two numbers, returns the smaller (or greater respectively).
min : Number a -> Number a -> Number a
max : Number a -> Number a -> Number a

-- Clamps a number within a given range, so `clamp 100 200 x` is 200 for
-- x >= 200, 100 for x <= 100, and x for any 100 < x < 200 
clamp : Number a -> Number a -> Number a -> Number a

-- An approximation of pi.
pi : Float

-- An approximation of e.
e : Float

-- Compare any two values for structural equality and inequality.
-- Functions cannot be compared.
(==) : Comparable a -> Comparable a -> Bool
(/=) : Comparable a -> Comparable a -> Bool<commit_msg>Have equality work on any type.<commit_after>
module Prelude where

import Native.Prelude as N

radians : Float -> Float
radians t = t

degrees : Float -> Float
degrees d = d * Math.PI / 180

turns : Float -> Float
turns r = 2 * Math.PI * r

(+) : Number a -> Number a -> Number a
(-) : Number a -> Number a -> Number a
(*) : Number a -> Number a -> Number a
(/) : Float -> Float -> Float

-- Integer division, remainder is discarded.
div : Int -> Int -> Int

-- Finds the remainder after dividing one number by another: 4 `rem` 3 == 1
rem : Int -> Int -> Int

-- Perform modular arithmetic: 7 `mod` 2 == 1
mod : Int -> Int -> Int

-- Basic functions of trigonometry.
cos  : Float -> Float
sin  : Float -> Float
tan  : Float -> Float
acos : Float -> Float
asin : Float -> Float
atan : Float -> Float

-- Returns the arctangent of the quotient of its arguments in radians.
-- So `atan2 y x` computes the angle from the positive x-axis to the vector
-- starting at the origin and ending at (x,y).
atan2 : Float -> Float -> Float

-- Take the square root of a number.
sqrt : Number a -> Number a

-- Take the absolute value of a number.
abs : Number a -> Number a

-- Calculate the logarithm of a number with a given base: `logBase 10 100 == 2`
logBase : Number a -> Number a -> Number a

-- Given two numbers, returns the smaller (or greater respectively).
min : Number a -> Number a -> Number a
max : Number a -> Number a -> Number a

-- Clamps a number within a given range, so `clamp 100 200 x` is 200 for
-- x >= 200, 100 for x <= 100, and x for any 100 < x < 200 
clamp : Number a -> Number a -> Number a -> Number a

-- An approximation of pi.
pi : Float

-- An approximation of e.
e : Float

-- Compare any two values for structural equality and inequality.
-- Functions cannot be compared.
(==) : a -> a -> Bool
(/=) : a -> a -> Bool
{'fraction_non_alphanumeric': 0.11960043196544276, 'fraction_numerical': 0.02267818574514039, 'mean_word_length': 2.6574531095755183, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 85, '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': '3788445', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1093, 'n_words': 576}