1
0
Fork 0
pr3-sose2026-fork/haskell/03-functions/functions.hs

34 lines
956 B
Haskell
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

-- single parameter
-- two parameters
-- ============= pattern matching =================
-- ============= guards =================
-- ============= recursive algorithms =================
-- ============= recursive list algorithms =================
-- ============= merge sort =================
-- =========== Filter all numbers that can be divided by 10 ===========
-- ========================== standard deviation using lambdas =====================
-- The standard deviation is a measure of the amount of variation or dispersion of a set of values.
-- It is defined as the square root of the average of the squared differences from the mean.
--
-- Formula:
-- σ = sqrt( (1/N) * Σ (xi - μ)^2 )
-- where:
-- - σ is the standard deviation,
-- - N is the number of values,
-- - xi represents each value,
-- - μ is the mean of the values.
stddev seq = 0
-- ======================= order list of strings by length =================