This module defines some utility functions for the partial evaluator.
Author: Björn Peemöller
Version: September 2015
none
:: (a -> Bool) -> [a] -> Bool
Does no element satisfy the predicate? |
sameLength
:: [a] -> [b] -> Bool
Do two lists have the same length? |
count
:: a -> [a] -> Int
Count the number of occurrences of an element in a list. |
countBy
:: (a -> Bool) -> [a] -> Int
Count the number of elements in a list that satisfy the given predicate. |
disjoint
:: [a] -> [a] -> Bool
Check if the two lists are disjoint. |
dropLast
:: Int -> [a] -> [a]
Drop the last n
elements from a given list.
|
lpad
:: Int -> String -> String
Pad a string to a specific length with space from the left side. |
rpad
:: Int -> String -> String
Pad a string to a specific length with space from the right side. |
indentStr
:: Int -> String -> String
Indent a String , possibly containing multiple lines via newline,
by a given number of spaces for each single line.
|
(+\+)
:: String -> String -> String
String
concatenation with newline in between.
|
Does no element satisfy the predicate? |
Do two lists have the same length? |
Count the number of occurrences of an element in a list. |
Count the number of elements in a list that satisfy the given predicate. |
Check if the two lists are disjoint. |
Drop the last |
Pad a string to a specific length with space from the left side. |
Pad a string to a specific length with space from the right side. |
Indent a |
|