h&       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                                                                                                                                                                                                                    !!!!!!!!!!!!!"""""""""""""""""""""""""""""###########################################################################$$$$$%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''(((((((((((((((((((((((((((((((((((((((((((()))))))))))))))) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )) Safe-Inferred$~hmt-base#Inclusive range of cell references.hmt-base Cell reference, column then row.hmt-base"Inclusive range of row references.hmt-base1-indexed row reference.hmt-base%Inclusive range of column references.hmt-baseA indexed case-insensitive column references. The column following Z is AA.hmt-baseZero index of . hmt-baseCase folding letter to index function. Only valid for ASCII letters. map letter_index ['A' .. 'Z'] == [0 .. 25] map letter_index ['a','d' .. 'm'] == [0,3 .. 12] hmt-base Inverse of  . 0map index_letter [0,3 .. 12] == ['A','D' .. 'M'] hmt-baseTranslate column reference to 0-index. :set -XOverloadedStrings map column_index ["A","c","z","ac","XYZ"] == [0,2,25,28,17575] hmt-baseColumn reference to interior index within specified range. Type specialised *+. map (Data.Ix.index ('A','Z')) ['A','C','Z'] == [0,2,25] map (interior_column_index ("A","Z")) ["A","C","Z"] == [0,2,25] map (Data.Ix.index ('B','C')) ['B','C'] == [0,1] map (interior_column_index ("B","C")) ["B","C"] == [0,1] hmt-base Inverse of  . let c = ["A","Z","AA","AZ","BA","BZ","CA"] map column_ref [0,25,26,51,52,77,78] == c %column_ref (0+25+1+25+1+25+1) == "CA"hmt-baseType specialised  . column_ref_pred "DF" == "DE"hmt-baseType specialised  . column_ref_succ "DE" == "DF"hmt-base Bimap of  . column_indices ("b","p") == (1,15) column_indices ("B","IT") == (1,253)hmt-baseType specialised *,. column_range ("L","R") == ["L","M","N","O","P","Q","R"] Data.Ix.range ('L','R') == "LMNOPQR"hmt-baseType specialised *-. map (column_in_range ("L","R")) ["A","N","Z"] == [False,True,False] map (column_in_range ("L","R")) ["L","N","R"] == [True,True,True] map (Data.Ix.inRange ('L','R')) ['A','N','Z'] == [False,True,False] map (Data.Ix.inRange ('L','R')) ['L','N','R'] == [True,True,True]hmt-baseType specialised *.. map column_range_size [("A","Z"),("AA","ZZ")] == [26,26 * 26] Data.Ix.rangeSize ('A','Z') == 26hmt-baseType specialised *,.hmt-base0The standard uppermost leftmost cell reference, A1. +Just cell_ref_minima == parse_cell_ref "A1"hmt-basecell_range (("AA",1),("AC",1)) == [("AA",1),("AB",1),("AC",1)] let r = [("AA",1),("AA",2),("AB",1),("AB",2),("AC",1),("AC",2)] cell_range (("AA",1),("AC",2)) == r hmt-base8Data.Either.isRight, which however hugs doesn't know of.?hmt-baseData.Either.partitionEithers, which however hugs doesn't know of. 6789:;<=>? 6789:;<=>? Safe-Inferred5?@hmt-baseGeneric variant of   (p.263).Ahmt-baseGeneric variant of   (p.263).Bhmt-base Variant of   that, if p is after q, cycles from   to  . import Data.Word enum_from_to_cyclic (254 :: Word8) 1 == [254,255,0,1]Chmt-base Variant of   that, if p is after q, enumerates from q to p. enum_from_to_reverse 5 1 == [5,4,3,2,1] enum_from_to_reverse 1 5 == enumFromTo 1 5Dhmt-baseAll elements in sequence. .(enum_univ :: [Data.Word.Word8]) == [0 .. 255]Ehmt-baseList of  ! values not in sorted input list. enum_list_gaps "abdh" == "cefg"Fhmt-baseE of  @ABCDEF@ABCDEF Safe-Inferred;OGhmt-baseBinary operator.Hhmt-baseUnary operator.Ihmt-baseIterate the function f n times, the inital value is x. recur_n 5 (* 2) 1 == 32 take (5 + 1) (iterate (* 2) 1) == [1,2,4,8,16,32]Jhmt-base  of  . const2 5 undefined undefined == 5 const (const 5) undefined undefined == 5Khmt-base " of predicates, ie. do predicates f and g both hold at x.Lhmt-baseList variant of K, ie.  let r = [False,False,True,False,True,False] map (predicate_all [(> 0),(< 5),even]) [0..5] == rMhmt-base  of predicates.Nhmt-base  of predicates, ie. logical or of list of predicates. let r = [True,False,True,False,True,True] map (predicate_any [(== 0),(== 5),even]) [0..5] == rOhmt-base   .Phmt-base     , ie. ((t -> c) -> (a -> b -> t) -> a -> b -> c.Qhmt-basefmap of fmap2, ie. 2(t -> d) -> (a -> b -> c -> t) -> a -> b -> c -> d.Rhmt-basefmap of fmap3.Shmt-base fmap of fmap4Thmt-base fmap of fmap5Uhmt-baseOperator name for fmap2.Vhmt-baseOperator name for fmap3.Whmt-baseOperator name for fmap4.Xhmt-baseOperator name for fmap5.Yhmt-baseOperator name for fmap6.Zhmt-base"Apply f to both sides of p, , ie.   f f). This is the generic version of bimap1.[hmt-baseApply f< to both elements of a two-tuple. Type-specialised bimap1f.GHIJKLMNOPQRSTUVWXYZ[HGIJKLMNOPQRSTUVWXYZ[U8V8W8X8Y8  Safe-Inferred> \hmt-base  of  , implemented via  Data.Text.]hmt-base;Read (strictly) a UTF-8 encoded text file, implemented via  Data.Text.^hmt-base]/, or a default value if the file doesn't exist._hmt-baseWrite UTF8 string as file, via  Data.Text.`hmt-base  variant using   for  ISO 8859-1 (Latin 1) encoding.ahmt-base  variant using   for local encoding.bhmt-baseInteract with files. Like Prelude.interact, but with named files.chmt-base8Get line from stdin if there is any input, else Nothing.dhmt-baseWait for input to be available, and then get lines while input remains available.ehmt-baseInteract with stdin and stdout. Like Prelude.interact, but with pipes. \]^_`abcde \]^_`abcde  Safe-Inferredfhmt-baseComparison function type.ghmt-base12;, ie. starting index (zero-indexed) and number of elements. slice 4 5 [1..] == [5,6,7,8,9]hhmt-base;Variant of slice with start and end indices (zero-indexed).  section 4 8 [1..] == [5,6,7,8,9]ihmt-base,Bracket sequence with left and right values. &bracket ('<','>') "1,2,3" == "<1,2,3>"jhmt-base%Variant where brackets are sequences. ,bracket_l ("<:",":>") "1,2,3" == "<:1,2,3:>"khmt-base-The first & middle & last elements of a list. map unbracket_el ["","{12}"] == [(Nothing,"",Nothing),(Just '{',"12",Just '}')]lhmt-base-The first & middle & last elements of a list. :map unbracket ["","{12}"] == [Nothing,Just ('{',"12",'}')]mhmt-baseErroring variant.nhmt-base Relative of  ", but only makes first separation. splitOn "//" "lhs//rhs//rem" == ["lhs","rhs","rem"] separate_at "//" "lhs//rhs//rem" == Just ("lhs","rhs//rem")ohmt-base Variant of   that keeps delimiters at left. split_when_keeping_left (== 'r') "rab rcd re rf r" == ["","rab ","rcd ","re ","rf ","r"]phmt-baseSplit before the indicated element, keeping it at the left of the sub-sequence it begins. o of   split_before 'x' "axbcxdefx" == ["a","xbc","xdef","x"] split_before 'x' "xa" == ["","xa"] map (flip split_before "abcde") "ae_" == [["","abcde"],["abcd","e"],["abcde"]] map (flip break "abcde" . (==)) "ae_" == [("","abcde"),("abcd","e"),("abcde","")] split_before 'r' "rab rcd re rf r" == ["","rab ","rcd ","re ","rf ","r"]qhmt-base4Split before any of the indicated set of delimiters. split_before_any ",;" ";a,b,c;d;" == ["",";a",",b",",c",";d",";"]rhmt-baseSingleton variant of  . 8split_on_1 ":" "graph:layout" == Just ("graph","layout")shmt-baseErroring variant.thmt-base7Split function that splits only once, ie. a variant of  . split1 ' ' "three word sentence" == Just ("three","word sentence")uhmt-baseErroring variant.vhmt-base2If length is not even the second "half" is longer. split_into_halves [] == ([],[]) split_into_halves [1] == ([],[1]) split_into_halves [1 .. 2] == ([1],[2]) split_into_halves [1 .. 8] == ([1,2,3,4],[5,6,7,8]) split_into_halves [1 .. 9] == ([1,2,3,4],[5,6,7,8,9])whmt-baseGeneric form of x.xhmt-baseLeft rotation. rotate_left 1 [1..3] == [2,3,1] rotate_left 3 [1..5] == [4,5,1,2,3]yhmt-baseGeneric form of z.zhmt-baseRight rotation.  rotate_right 1 [1..3] == [3,1,2]{hmt-baseRotate left by n   #p, places. Therefore negative n rotate right. rotate 1 [1..3] == [2,3,1] rotate 8 [1..5] == [4,5,1,2,3] (rotate (-1) "ABCD",rotate 1 "ABCD") == ("DABC","BCDA")|hmt-baseRotate right by n places.  rotate_r 8 [1..5] == [3,4,5,1,2]}hmt-baseAll rotations. .rotations [0,1,3] == [[0,1,3],[1,3,0],[3,0,1]]~hmt-base3Rotate list so that is starts at indicated element. rotate_starting_from 'c' "abcde" == Just "cdeab" rotate_starting_from '_' "abc" == Nothinghmt-baseErroring variant.hmt-base Sequence of n& adjacent elements, moving forward by k/ places. The last element may have fewer than n7 places, but will reach the end of the input sequence. .adj 3 2 "adjacent" == ["adj","jac","cen","nt"]hmt-base Variant of  where the last element has n9 places but may not reach the end of the input sequence. adj_trunc 4 1 "adjacent" == ["adja","djac","jace","acen","cent"] adj_trunc 3 2 "adjacent" == ["adj","jac","cen"]hmt-base of  by n-1. adj_cyclic_trunc 3 1 "adjacent" == ["adj","dja","jac","ace","cen","ent","nta","tad"]hmt-baseGeneric form of .hmt-base;Adjacent elements of list, at indicated distance, as pairs. adj2 1 [1..5] == [(1,2),(2,3),(3,4),(4,5)] let l = [1..5] in zip l (tail l) == adj2 1 l adj2 2 [1..4] == [(1,2),(3,4)] adj2 3 [1..5] == [(1,2),(4,5)]hmt-base Append first n-elements to end of list. close 1 [1..3] == [1,2,3,1]hmt-base    1. +adj2_cyclic 1 [1..3] == [(1,2),(2,3),(3,1)]hmt-baseAdjacent triples. "adj3 3 [1..6] == [(1,2,3),(4,5,6)]hmt-base    2. 9adj3_cyclic 1 [1..4] == [(1,2,3),(2,3,4),(3,4,1),(4,1,2)]hmt-baseAdjacent quadruples. adj4 2 [1..8] == [(1,2,3,4),(3,4,5,6),(5,6,7,8)] adj4 4 [1..8] == [(1,2,3,4),(5,6,7,8)]hmt-baseInterleave elements of p and q1. If not of equal length elements are discarded. interleave [1..3] [4..6] == [1,4,2,5,3,6] interleave ".+-" "abc" == ".a+b-c" interleave [1..3] [] == []hmt-baseInterleave list of lists. Allows lists to be of non-equal lenghts. interleave_set ["abcd","efgh","ijkl"] == "aeibfjcgkdhl" interleave_set ["abc","defg","hijkl"] == "adhbeicfjgkl"hmt-baseDe-interleave n lists. deinterleave 2 ".a+b-c" == [".+-","abc"] deinterleave 3 "aeibfjcgkdhl" == ["abcd","efgh","ijkl"]hmt-base)Special case for two-part deinterleaving. 'deinterleave2 ".a+b-c" == (".+-","abc")hmt-base-Variant that continues with the longer input. interleave_continue ".+-" "abc" == ".a+b-c" interleave_continue [1..3] [] == [1..3] interleave_continue [] [1..3] == [1..3]hmt-base of x by i and j. interleave_rotations 9 3 [1..13] == [10,4,11,5,12,6,13,7,1,8,2,9,3,10,4,11,5,12,6,13,7,1,8,2,9,3]hmt-base , apply f1 and f2 and  .hmt-baseGeneralised histogram, with equality function for grouping and comparison function for sorting.hmt-baseType specialised .hmt-base&Count occurences of elements in list,  of   and  .hmt-baseType specialised '. Elements will be in ascending order. map histogram ["","hohoh","yxx"] == [[],[('h',3),('o',2)],[('x',2),('y',1)]]hmt-base*Join two histograms, which must be sorted. histogram_join (zip "ab" [1,1]) (zip "bc" [1,1]) == zip "abc" [1,2,1]hmt-base  of . let f x = zip x (repeat 1) in histogram_merge (map f ["ab","bcd","de"]) == zip "abcde" [1,2,1,2,1]hmt-baseGiven (k,#) histogram where k is enumerable generate filled histogram with 0 for empty k. histogram_fill (histogram "histogram") == zip ['a'..'t'] [1,0,0,0,0,0,1,1,1,0,0,0,1,0,1,0,0,1,1,1]hmt-baseGiven two histograms p & q (sorted by key) make composite histogram giving for all keys the counts for (p,q). r = zip "ABCDE" (zip [4,3,2,1,0] [2,3,4,0,5]) histogram_composite (zip "ABCD" [4,3,2,1]) (zip "ABCE" [2,3,4,5]) == rhmt-baseApply   at count of , ie. 0 indicates equal number at p and q, negative indicates more elements at p than q and positive more elements at q than p. histogram_diff (zip "ABCD" [4,3,2,1]) (zip "ABCE" [2,3,4,5]) == zip "ABCDE" [-2,0,2,-1,5]hmt-baseElements that appear more than once in the input given equality predicate.hmt-base of  . 6map duplicates ["duplicates","redundant"] == ["","dn"]hmt-baseList segments of length i at distance j. segments 2 1 [1..5] == [[1,2],[2,3],[3,4],[4,5]] segments 2 2 [1..5] == [[1,2],[3,4]]hmt-base   . .intersect_l [[1,2],[1,2,3],[1,2,3,4]] == [1,2]hmt-base   . +sort (union_l [[1,3],[2,3],[3]]) == [1,2,3]hmt-base6Intersection of adjacent elements of list at distance n. dx_d' 5 [1,2,3] == (11,[5,6,8]) dx_d' 0 [1,1,1] == (3,[0,1,2])hmt-baseIntegration with f, ie. apply flip of f between elements of l. d_dx_by (,) "abcd" == [('b','a'),('c','b'),('d','c')] d_dx_by (-) [0,2,4,1,0] == [2,2,-3,-1] d_dx_by (-) [2,3,0,4,1] == [1,-3,4,-3]hmt-base Integrate,   /, ie. pitch class segment to interval sequence. (d_dx [5,6,8,11] == [1,2,3] d_dx [] == []hmt-base Elements of p not in q. ![1,2,3] `difference` [1,2] == [3]hmt-baseIs p a subset of q , ie. is   of p and q   p. >map (is_subset [1,2]) [[1],[1,2],[1,2,3]] == [False,True,True]hmt-baseIs p a proper subset of q,  and   equal. map (is_proper_subset [1,2]) [[1],[1,2],[1,2,3]] == [False,False,True]hmt-baseIs p a superset of q, ie.   . !is_superset [1,2,3] [1,2] == Truehmt-baseIs p a subsequence of q, ie. synonym for  . !subsequence [1,2] [1,2,3] == Truehmt-baseErroring variant of  .hmt-baseErroring variant of  .hmt-base Variant of   that requires e to be unique in p. *elem_index_unique 'a' "abcda" == undefinedhmt-base.Lookup that errors and prints message and key.hmt-baseError variant.hmt-base  variant with default value.hmt-baseIf l is empty  , else   l.hmt-base Variant on   that selects all matches. 3lookup_set 1 (zip [1,2,3,4,1] "abcde") == Just "ae"hmt-baseErroring variant.hmt-baseReverse lookup. reverse_lookup 'c' [] == Nothing reverse_lookup 'b' (zip [1..] ['a'..]) == Just 2 lookup 2 (zip [1..] ['a'..]) == Just 'b'hmt-baseErroring variant.hmt-baseErroring variant of  .hmt-base Basis of , indicates if x is to the left or right of the list, and if to the right whether equal or not.  ? values will be correct if the list is not ascending, however  - values only make sense for ascending ranges. 8map (find_bounds_cmp compare [(0,1),(1,2)]) [-1,0,1,2,3]hmt-baseDecide if value is nearer the left or right value of a range, return   or  .hmt-base with   of   as measure. 8(decide_nearest True 2 (1,3)) ("left","right") == "left"hmt-basesel_f gets comparison key from t.hmt-baseFind the number that is nearest the requested value in an ascending list of numbers. map (find_nearest_err True [0,3.5,4,7]) [-1,1,3,5,7,9] == [0,0,3.5,4,7,7]hmt-base allowing   input list (which returns  )hmt-base Basis of . There is an option to consider the last element specially, and if equal to the last span is given.scl=special-case-lasthmt-baseFind adjacent elements of list that bound element under given comparator. let {f = find_bounds True compare [1..5] ;r = [Nothing,Just (1,2),Just (3,4),Just (4,5)]} in map f [0,1,3.5,5] == rhmt-baseSpecial case of . 2map drop_last ["","?","remove"] == ["","","remov"]hmt-base Variant of   from right of list. dropRight 1 [1..9] == [1..8]hmt-base Variant of   from right of list. .dropWhileRight Data.Char.isDigit "A440" == "A"hmt-base;Data.List.dropWhileEnd, which however hugs doesn't know of.hmt-base  form of . 0drop_while_right Data.Char.isDigit "A440" == "A"hmt-base  from right. take_right 3 "taking" == "ing"hmt-base  from right. 0takeWhileRight Data.Char.isDigit "A440" == "440"hmt-base  form of . 2take_while_right Data.Char.isDigit "A440" == "440"hmt-base Variant of   that allows   to indicate the complete list. maybe_take (Just 5) [1 .. ] == [1 .. 5] maybe_take Nothing [1 .. 9] == [1 .. 9]hmt-base Take until f# is true. This is not the same as   at   because it keeps the last element. It is an error if the predicate never succeeds. take_until (== 'd') "tender" == "tend" takeWhile (not . (== 'd')) "tend" == "ten" take_until (== 'd') "seven" == undefinedhmt-baseApply f at first element, and g at all other elements. (at_head negate id [1..5] == [-1,2,3,4,5]hmt-baseApply f at all but last element, and g at last element. )at_last (* 2) negate [1..4] == [2,4,6,-4]hmt-baseSeparate list into an initial list and perhaps the last element tuple. !separate_last' [] == ([],Nothing)hmt-baseError on null input. "separate_last [1..5] == ([1..4],5)hmt-base(Replace directly repeated elements with  . indicate_repetitions "abba" == [Just 'a',Just 'b',Nothing,Just 'a']hmt-base  of list and it's own tail. zip_with_adj (,) "abcde" == [('a','b'),('b','c'),('c','d'),('d','e')]hmt-baseType-specialised .hmt-base of  . (compare_adjacent [0,1,3,2] == [LT,LT,GT]hmt-baseHead and tail of list. Useful to avoid "incomplete-uni-patterns" warnings. It's an error if the list is empty.hmt-baseFirst and second elements of list. Useful to avoid "incomplete-uni-patterns" warnings. It's an error if the list has less than two elements.hmt-base  does not make adjacent comparisons, it compares each new element to the start of the group. This function is the adjacent variant. groupBy (<) [1,2,3,2,4,1,5,9] == [[1,2,3,2,4],[1,5,9]] adjacent_groupBy (<) [1,2,3,2,4,1,5,9] == [[1,2,3],[2,4],[1,5,9]]hmt-base1Reduce sequences of consecutive values to ranges. group_ranges [-1,0,3,4,5,8,9,12] == [(-1,0),(3,5),(8,9),(12,12)] group_ranges [3,2,3,4,3] == [(3,3),(2,4),(3,3)]hmt-base  on  structure of   , ie. all   compare equal. let r = [[Just 1],[Nothing,Nothing],[Just 4,Just 5]] in group_just [Just 1,Nothing,Nothing,Just 4,Just 5] == rhmt-base7Predicate to determine if all elements of the list are  . all_equal "aaa" == Truehmt-baseVariant using  .hmt-base      f. 7nub_on snd (zip "ABCD" "xxyy") == [('A','x'),('C','y')]hmt-base of  . let r = [[('1','a'),('1','c')],[('2','d')],[('3','b'),('3','e')]] in sort_group_on fst (zip "13123" "abcde") == rhmt-baseMaybe cons element onto list. Nothing `mcons` "something" == "something" Just 's' `mcons` "omething" == "something"hmt-baseCons onto end of list. snoc 4 [1,2,3] == [1,2,3,4]hmt-baseIf f compares   , defer to g.hmt-base    of hmt-baseSequence of comparison functions, continue comparing until not EQ. compare (1,0) (0,1) == GT n_stage_compare [compare `on` snd,compare `on` fst] (1,0) (0,1) == LThmt-base    of hmt-baseSort sequence a based on ordering of sequence b. sort_to "abc" [1,3,2] == "acb" sort_to "adbce" [1,4,2,3,5] == "abcde"hmt-base  of . *sort_to_rev [1,4,2,3,5] "adbce" == "abcde"hmt-base  of .hmt-base  of .hmt-base  of .hmt-base  of .hmt-baseGiven a comparison function, merge two ascending lists. Alias for  (merge_by compare [1,3,5] [2,4] == [1..5]hmt-base    .hmt-base  of .hmt-base Alias for  hmt-baseMerge list of sorted lists given comparison function. Note that this is not equal to  .hmt-base of  . 1merge_set [[1,3,5,7,9],[2,4,6,8],[10]] == [1..10]hmt-base. variant that joins (resolves) equal elements. let {left p _ = p ;right _ q = q ;cmp = compare `on` fst ;p = zip [1,3,5] "abc" ;q = zip [1,2,3] "ABC" ;left_r = [(1,'a'),(2,'B'),(3,'b'),(5,'c')] ;right_r = [(1,'A'),(2,'B'),(3,'C'),(5,'c')]} in merge_by_resolve left cmp p q == left_r && merge_by_resolve right cmp p q == right_r merge_by_resolve (\x _ -> x) (compare `on` fst) [(0,'A'),(1,'B'),(4,'E')] (zip [1..] "bcd")hmt-baseMerge two sorted (ascending) sequences. Where elements compare equal, select element from left input. asc_seq_left_biased_merge_by (compare `on` fst) [(0,'A'),(1,'B'),(4,'E')] (zip [1..] "bcd")hmt-base/Find the first two adjacent elements for which f is True. find_adj (>) [1,2,3,3,2,1] == Just (3,2) find_adj (>=) [1,2,3,3,2,1] == Just (3,3)hmt-base of  filter is_ascending (words "A AA AB ABB ABC ABA") == words "A AB ABC"hmt-base of  filter is_non_descending (words "A AA AB ABB ABC ABA") == ["A","AA","AB","ABB","ABC"]hmt-base Variant of  5 that operates on a sorted list, halting. This is  . 16 `elem_ordered` [1,3 ..] == False 16 `elem` [1,3 ..] == undefinedhmt-base Variant of  ) that operates on a sorted list, halting. 16 `elemIndex_ordered` [1,3 ..] == Nothing 16 `elemIndex_ordered` [0,1,4,9,16,25,36,49,64,81,100] == Just 4hmt-base  variant equivalent to   (ie.   of  )hmt-base 5 variant that extends shorter side using given value.hmt-base of ',' let f = zip_ext 'i' 'j' f "" "" == [] f "p" "" == zip "p" "j" f "" "q" == zip "i" "q" f "pp" "q" == zip "pp" "qj" f "p" "qq" == zip "pi" "qq"hmt-baseKeep right variant of  ', where unused rhs values are returned. zip_with_kr (,) [1..3] ['a'..'e'] == ([(1,'a'),(2,'b'),(3,'c')],"de")hmt-baseA   variant that always consumes an element from the left hand side (lhs), but only consumes an element from the right hand side (rhs) if the zip function is   and not if  . There's also a secondary function to continue if the rhs ends before the lhs.hmt-baseZip a list with a list of lists. Ordinarily the list has at least as many elements as there are elements at the list of lists. There is also a Traversable form of this called adopt_shape_2_zip_stream. zip_list_with_list_of_list [1 ..] ["a", "list", "of", "strings"] zip_list_with_list_of_list [1 .. 9] ["a", "list", "of", "strings"]hmt-baseFill gaps in a sorted association list, range is inclusive at both ends. let r = [(1,'a'),(2,'x'),(3,'x'),(4,'x'),(5,'b'),(6,'x'),(7,'c'),(8,'x'),(9,'x')] in fill_gaps_ascending' 'x' (1,9) (zip [1,5,7] "abc") == rhmt-baseDirect definition.hmt-base5Variant with default value for empty input list case.hmt-base  and   in one pass. minmax "minmax" == ('a','x')hmt-baseAppend k to the right of l until result has n' places. Truncates long input lists. map (pad_right '0' 2 . return) ['0' .. '9'] pad_right '0' 12 "1101" == "110100000000" map (pad_right ' '3) ["S","E-L"] == ["S ","E-L"] pad_right '!' 3 "truncate" == "tru"hmt-base4Variant that errors if the input list has more than n places. 1map (pad_right_err '!' 3) ["x","xy","xyz","xyz!"]hmt-base+Variant that will not truncate long inputs. 4pad_right_no_truncate '!' 3 "truncate" == "truncate"hmt-baseAppend k to the left of l until result has n places. *map (pad_left '0' 2 . return) ['0' .. '9']hmt-base%Locate first (leftmost) embedding of q in p). Return partial indices for failure at  . embedding ("embedding","ming") == Right [1,6,7,8] embedding ("embedding","mind") == Left [1,6,7]hmt-base fromRight of hmt-baseDoes q: occur in sequence, though not necessarily adjacently, in p. is_embedding [1 .. 9] [1,3,7] == True is_embedding "embedding" "ming" == True is_embedding "embedding" "mind" == Falsehmt-baseUnpack one element list.hmt-baseErroring variant.hmt-base Given an   predicate where   opens a group,   closes a group, and  3 continues current group, construct tree from list. let l = "a {b {c d} e f} g h i" let t = group_tree ((==) '{',(==) '}') l catMaybes (flatten t) == l let {d = putStrLn . drawTree . fmap show} in d (group_tree ((==) '(',(==) ')') "a(b(cd)ef)ghi")hmt-baseRemove element at index. map (remove_ix 5) ["remove","removed"] == ["remov","removd"] remove_ix 5 "short" -- errorhmt-baseDelete element at ix from list (c.f. remove_ix, this has a more specific error if index does not exist). delete_at 3 "deleted" == "delted" delete_at 8 "deleted" -- errorhmt-base,Select or remove elements at set of indices.hmt-base"Select elements at set of indices. !select_ixs [1,3] "select" == "ee"hmt-base"Remove elements at set of indices. $remove_ixs [1,3,5] "remove" == "rmv"hmt-baseReplace element at i in p by application of f. &replace_ix negate 1 [1..3] == [1,-2,3]hmt-base*List equality, ignoring indicated indices. :list_eq_ignoring_indices [3,5] "abcdefg" "abc.e.g" == Truehmt-baseEdit list to have v at indices k. Replacement assoc-list must be ascending. All replacements must be in range. list_set_indices [(2,'C'),(4,'E')] "abcdefg" == "abCdEfg" list_set_indices [] "abcdefg" == "abcdefg" list_set_indices [(9,'I')] "abcdefg" == undefinedhmt-base Variant of  with one replacement.hmt-baseCyclic indexing function. .map (at_cyclic "cycle") [0..9] == "cyclecycle"hmt-baseIndex list from the end, assuming the list is longer than n + 1.7atFromEnd [1 .. 30] 0 == 30 atFromEnd [1..100] 15 == 85fghijklmnopqrstuvwxyz{|}~ghijklmnopqrstuvwxyz{|}~f  Safe-Inferred5hmt-base with () edge labels.hmt-base of  hmt-base0Labelled graph, distinct vertex and edge labels.hmt-baseAdjacency matrix, (|v|,mtx)hmt-base3Adjacency list [(left-hand-side,[right-hand-side])]hmt-base((|V|,|E|),[E])hmt-base of  hmt-base(vertices,edges)hmt-baseUn-directed edge equality. e_eq_undir (0,1) (1,0) == Truehmt-base Sort edge. )map e_sort [(0,1),(1,0)] == [(0,1),(0,1)]hmt-base is a functor.hmt-base (|V|,|E|)hmt-baseRe-label graph given table.hmt-base:If (i,j) and (j,i) are both in E delete (j,i) where i < j.hmt-base!List of E to G, derives V from E.hmt-base Sort v and e.hmt-base5Complete k-graph (un-directed) given list of vertices gr_complete_graph "xyz" == ("xyz",[('x','y'),('x','z'),('y','z')])hmt-baseSimple text representation of . Requires (and checks) that vertices are (0 .. |v|-1). The first line is the number of vertices, following lines are edges.hmt-base  to .hmt-base to  g = ([0,1,2],[(0,1),(0,2),(1,2)]) g == gr_sort (graph_to_g (g_to_graph g))hmt-baseUnlabel graph, make table. gr_unlabel ("xyz",[('x','y'),('x','z')]) == (([0,1,2],[(0,1),(0,2)]),[(0,'x'),(1,'y'),(2,'z')])hmt-base  of hmt-base of . gr = ("abc",[('a','b'),('a','c'),('b','c')]) (g,tbl) = gr_to_graph grhmt-baseComplete k-graph (un-directed). 3g_complete_graph 3 == ([0,1,2],[(0,1),(0,2),(1,2)])hmt-base7Requires (and checks) that vertices are (0 .. |v| - 1).hmt-base/Requires (but does not check) that vertices of  are all in (0,|v| - 1).hmt-base$Parse Edg as printed by nauty-listg.hmt-base to edge set.hmt-base to hmt-base to  (selection-function)hmt-base to  (directed) g = ([0,1,2,3],[(0,1),(2,1),(0,3),(3,0)]) r = [(0,[1,3]),(2,[1]),(3,[0])] gr_to_adj_dir g == rhmt-base to  (un-directed) g = ([0,1,2,3],[(0,1),(2,1),(0,3),(3,0)]) gr_to_adj_undir g == [(0,[1,3,3]),(1,[2])]hmt-base%Edg to Adj_Mtx for un-directed graph. e = ((4,3),[(0,3),(1,3),(2,3)]) edg_to_adj_mtx_undir (0,1) e == (4,[[0,0,0,1],[0,0,0,1],[0,0,0,1],[1,1,1,0]]) e = ((4,4),[(0,1),(0,3),(1,2),(2,3)]) edg_to_adj_mtx_undir (0,1) e == (4,[[0,1,0,1],[1,0,1,0],[0,1,0,1],[1,0,1,0]])hmt-base of hmt-baseLookup  to find connected vertices.hmt-baseNumber of vertices and edges.hmt-baseApply v at vertex labels and e at edge labels.hmt-base Merge two 2 graphs, do not share vertices, vertex indices at g1 are stable.hmt-base  of hmt-baseRe-write graph so vertex indices are (0 .. n-1) and vertex labels are unique.hmt-base4Re-write edges so that vertex indices are ascending.hmt-base path graph.hmt-base+ complete graph (undirected, no self-edges)hmt-base'Lookup vertex label with default value.hmt-base with   as default.hmt-base%Lookup edge label with default value.hmt-base with   as default.hmt-base Convert from  to hmt-base Convert from  to . gr_to_lbl ("ab",[('a','b')]) == ([(0,'a'),(1,'b')],[((0,1),('a','b'))])hmt-baseDelete edge labels from , replacing with ()hmt-base of hmt-base.Construct Lbl from set of E, derives V from E.hmt-baseUnlabel  graph.77  Safe-Inferredhmt-baseReal, alias for  hmt-baseLcf notation (l,k#). ([3,-3],4) is the cubical graph.hmt-baseSequence, ie. l k times.hmt-base Length of  , ie. |l|khmt-base to  (an edge list)hmt-base:Lcf edge-list to graph labeled with circular co-ordinates.hmt-baseLcf graph set given at -http://mathworld.wolfram.com/LcfNotation.html length lcf_mw_set == 57 length (nub (map snd lcf_mw_set)) == 57 -- IE. UNIQ  Safe-InferredWhmt-base<(problem,vertex-colours,edges) Bliss data is one-indexed.hmt-baseProblem is (n-vertices,n-edges)hmt-base Vertex colour is (vertex,colour)hmt-baseEdge is (vertex,vertex)hmt-baseParse hmt-base of  hmt-base (one-indexed) to  (zero-indexed) Safe-Inferred hmt-base5Load Graph6 file, discard optional header if present.hmt-base8Load G6 file variant where each line is "DescriptiontG6"hmt-baseCall nauty-listg to transform a sequence of G6. (debian = nauty)hmt-base of hmt-base of .hmt-base of hmt-base-Generate the text format read by nauty-amtog. e = ((4,3),[(0,3),(1,3),(2,3)]) m = T.edg_to_adj_mtx_undir (0,1) e putStrLn (adj_mtx_to_am m)hmt-base:Call nauty-amtog to transform a sequence of Adj_Mtx to G6. adj_mtx_to_g6 [m,m]hmt-base of hmt-base  of hmt-base.Call nauty-labelg to canonise a set of graphs.hmt-base of  of  g1 = ([0,1,2,3],[(0,3),(3,1),(3,2),(1,2)]) g2 = ([0,1,2,3],[(1,0),(0,3),(0,2),(2,3)]) [g3,g4] <- g_labelg [g1,g2] (g1 == g2,g3 == g4)   Safe-Inferredhmt-base%(n-vertices,clockwise-edge-sequences)hmt-base;The 15-character header text indicating a Planar-Code file.hmt-baseRead Plc headerhmt-baseRead Plc data as list of  hmt-base8Calculate length of Plc data given (n-vertices,n-edges).hmt-base Scan Plc data and segment after k zeros.hmt-base"Group Plc data into Plc structure.hmt-base(Segment input data into sequence of Plc.hmt-base2Load sequence of Plc from binary Planar-Code file.hmt-baseAll edges (one-indexed) at Plchmt-base Element in x after i*, the element after the last is the first. +map (plc_next_elem "abcd") "abcd" == "bcda"hmt-baseThe next edge in Plc following e.hmt-baseThe face of Plc starting at e (one-indexed edges).hmt-base0The set of all faces at Plc (one-indexed edges).hmt-base Translate  into un-directed ). Plc is one-indexed, G is zero-indexed.hmt-baseRun "nauty-planarg" to convert (if possible) a set of G6 graphs to Planar-Code.hmt-base of  of hmt-baseRun "nauty-planarg" to translate named G6 file to named PL file. Safe-Inferredhmt-baseMatrix indices are written (row,column) & are here _zero_ indexed.hmt-base-Matrix dimensions are written (rows,columns).hmt-base8Plain list representation of a two-dimensional table of a in row-order. Tables are regular, ie. all rows have equal numbers of columns.hmt-base of k.hmt-base  of association list.hmt-baseTable row count.hmt-base-Table column count, assumes table is regular.hmt-baseDetermine is table is regular, ie. all rows have the same number of columns. .tbl_is_regular [[0..3],[4..7],[8..11]] == Truehmt-baseMap f# at table, padding short rows with k.hmt-baseAppend a sequence of nil$ (or default) values to each row of tbl7 so to make it regular (ie. all rows of equal length).hmt-base Translate  by row and column delta. !ix_translate (1,2) (3,4) == (4,6)hmt-baseModulo  by . ix_modulo (4,4) (3,7) == (3,3)hmt-base8Given number of columns and row index, list row indices. &row_indices 3 1 == [(1,0),(1,1),(1,2)]hmt-base;Given number of rows and column index, list column indices. ,column_indices_at 3 1 == [(0,1),(1,1),(2,1)]hmt-baseAll zero-indexed matrix indices, in row order. This is the order given by  . matrix_indices (2,3) == [(0,0),(0,1),(0,2),(1,0),(1,1),(1,2)] sort (matrix_indices (2,3)) == matrix_indices (2,3)hmt-baseCorner indices of given , in row order. 8matrix_corner_indices (2,3) == [(0,0),(0,2),(1,0),(1,2)]hmt-base3Parallelogram corner indices, given as rectangular ' with an offset for the lower indices. parallelogram_corner_indices ((2,3),2) == [(0,0),(0,2),(1,2),(1,4)]hmt-baseApply  and  for all , ie. all translations of a shape in row order. The resulting . sets are not sorted and may have duplicates. concat (all_ix_translations (2,3) [(0,0)]) == matrix_indices (2,3)hmt-base/Sort sets into row order and remove duplicates. Safe-Inferredƚhmt-base Erroring  .hmt-base  of  .hmt-base  of . Safe-Inferredǁhmt-base The smallest   n such that 1 + n /= 1.hmt-base#Largest representable finite value.hmt-base5The smallest representable positive normalized value. Safe-Inferred^hmt-baseType specialised  hmt-baseType specialised  )let n = sqrt (-1) in (n,real_to_double n)hmt-baseType specialised  hmt-baseType specialised  hmt-baseType-specialise f, ie. round, ceiling, truncate map (double_to_int round) [0, 0.25 .. 1] == [0, 0, 0, 1, 1] map (double_to_int ceiling) [0, 0.25 .. 1] == [0, 1, 1, 1, 1] map (double_to_int floor) [0, 0.25 .. 1] == [0, 0, 0, 0, 1] map (double_to_int truncate) [0, 0.25 .. 1] == [0, 0, 0, 0, 1]hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised  hmt-baseType specialised   Safe-Inferred-hmt-base  5.hmt-base  7.hmt-base  12.hmt-base  16.hmt-base http://reference.wolfram.com/mathematica/ref/FractionalPart.html i.e.  ,integral_and_fractional_parts 1.5 == (1,0.5)hmt-baseType specialised.hmt-base http://reference.wolfram.com/mathematica/ref/FractionalPart.html import Sound.SC3.Plot {- hsc3-plot -} plot_p1_ln [map fractional_part [-2.0,-1.99 .. 2.0]]hmt-base  of .hmt-baseType specialised .hmt-base  of .hmt-baseType specialised .hmt-baseType specialised  hmt-baseType-specialised  hmt-baseType-specialised  hmt-baseIs r zero to k decimal places. map (flip zero_to_precision 0.00009) [4,5] == [True,False] map (zero_to_precision 4) [0.00009,1.00009] == [True,False]hmt-baseIs r whole to k decimal places. ;map (flip whole_to_precision 1.00009) [4,5] == [True,False]hmt-base >http://reference.wolfram.com/mathematica/ref/SawtoothWave.html 2plot_p1_ln [map sawtooth_wave [-2.0,-1.99 .. 2.0]]hmt-basePredicate that is true if n/d can be simplified, ie. where   of n and d is not 1. map rational_simplifies [(2,3),(4,6),(5,7)] == [False,True,False]hmt-base  and   of rational.hmt-baseRational as a whole number, or  .hmt-baseErroring variant.hmt-baseSum of numerator & denominator.hmt-baseIs n a whole (integral) value. map real_is_whole [-1.0,-0.5,0.0,0.5,1.0] == [True,False,True,False,True]hmt-base  .  .hmt-baseRound b to nearest multiple of a. map (round_to 0.25) [0,0.1 .. 1] == [0.0,0.0,0.25,0.25,0.5,0.5,0.5,0.75,0.75,1.0,1.0] map (round_to 25) [0,10 .. 100] == [0,0,25,25,50,50,50,75,75,100,100]hmt-base Variant of   that checks input for zero. map recip [1,1/2,0,-1] map recip_m [1,1/2,0,-1] == [Just 1,Just 2,Nothing,Just (-1)]hmt-base One-indexed   function. 1map (`oi_mod` 5) [1..10] == [1,2,3,4,5,1,2,3,4,5]hmt-base One-indexed   function. map (`oi_divMod` 5) [1,3 .. 9] == [(0,1),(0,3),(0,5),(1,2),(1,4)]hmt-base%Integral square root (sqrt) function. map i_square_root [0,1,4,9,16,25,36,49,64,81,100] == [0 .. 10] map i_square_root [4 .. 16] == [2,2,2,2,2,3,3,3,3,3,3,3,4]hmt-base(0,1) = {x | 0 < x < 1}hmt-base 0,1= {x | 0 D x D 1}hmt-base(p,q] (0,1] = {x | 0 < x D 1}hmt-base[p,q) [0,1) = {x | 0 D x < 1}hmt-base Calculate n th root of x. %12 `nth_root` 2 == 1.0594630943592953hmt-base$Arithmetic mean (average) of a list. map arithmetic_mean [[-3..3],[0..5],[1..5],[3,5,7],[7,7],[3,9,10,11,12]] == [0,2.5,3,5,7,9]hmt-baseNumerically stable mean map ns_mean [[-3..3],[0..5],[1..5],[3,5,7],[7,7],[3,9,10,11,12]] == [0,2.5,3,5,7,9]hmt-base Square of n. square 5 == 25hmt-baseThe totient function phi(n), also called Euler's totient function. import Sound.SC3.Plot {- hsc3-plot -} plot_p1_stp [map totient [1::Int .. 100]]hmt-baseThe n-th order Farey sequence. farey 1 == [0, 1] farey 2 == [0, 1/2, 1] farey 3 == [0, 1/3, 1/2, 2/3, 1] farey 4 == [0, 1/4, 1/3, 1/2, 2/3, 3/4, 1] farey 5 == [0, 1/5,1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4,4/5, 1] farey 6 == [0, 1/6,1/5,1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4,4/5,5/6, 1] farey 7 == [0, 1/7,1/6,1/5,1/4,2/7,1/3, 2/5,3/7,1/2,4/7,3/5, 2/3,5/7,3/4,4/5,5/6,6/7, 1] farey 8 == [0,1/8,1/7,1/6,1/5,1/4,2/7,1/3,3/8,2/5,3/7,1/2,4/7,3/5,5/8,2/3,5/7,3/4,4/5,5/6,6/7,7/8,1]hmt-baseThe length of the n-th order Farey sequence. map farey_length [1 .. 12] == [2,3,5,7,11,13,19,23,29,33,43,47] map (length . farey) [1 .. 12] == map farey_length [1 .. 12]hmt-baseFunction to generate the Stern-Brocot tree from an initial row.  * normalises so 1/0 cannot be written as a  , hence (n,d).hmt-baseThe Stern-Brocot tree from (01,10). let t = stern_brocot_tree t !! 0 == [(0,1),(1,0)] t !! 1 == [(0,1),(1,1),(1,0)] t !! 2 == [(0,1),(1,2),(1,1),(2,1),(1,0)] t !! 3 == [(0,1),(1,3),(1,2),(2,3),(1,1),(3,2),(2,1),(3,1),(1,0)] map length (take 12 stern_brocot_tree) == [2,3,5,9,17,33,65,129,257,513,1025,2049] -- A000051hmt-baseLeft-hand (rational) side of the the Stern-Brocot tree, ie, from (01,11).hmt-base as  s, for finite subsets. let t = stern_brocot_tree_f_r [0,1] t !! 1 == [0,1/2,1] t !! 2 == [0,1/3,1/2,2/3,1] t !! 3 == [0,1/4,1/3,2/5,1/2,3/5,2/3,3/4,1] t !! 4 == [0,1/5,1/4,2/7,1/3,3/8,2/5,3/7,1/2,4/7,3/5,5/8,2/3,5/7,3/4,4/5,1]hmt-base:Outer product of vectors represented as lists, c.f. liftM2 outer_product (*) [2..5] [2..5] == [[4,6,8,10],[6,9,12,15],[8,12,16,20],[10,15,20,25]] liftM2 (*) [2..5] [2..5] == [4,6,8,10,6,9,12,15,8,12,16,20,10,15,20,25]-- Safe-Inferred`hmt-baseCalculate histogram on numBins places. Returns the range of each bin and the number of elements in each. map (snd . bHistogram 10) [[1 .. 10],[1,1,1,2,2,3,10]] == [[1,1,1,1,1,1,1,1,1,1],[3,2,1,0,0,0,0,0,0,1]]hmt-baseCalculate range. bHistogramRange 10 (replicate 10 1) == (0.9, 1.1) bHistogramRange 10 (replicate 10 0) == (-1, 1) bHistogramRange 10 [1 .. 10] == (0.5, 10.5) bHistogramRange 25 [1 .. 10] == (0.8125,10.1875) Safe-InferredN hmt-baseVariant with error text.hmt-baseVariant of unzip. let r = ([Just 1,Nothing,Just 3],[Just 'a',Nothing,Just 'c']) in maybe_unzip [Just (1,'a'),Nothing,Just (3,'c')] == rhmt-baseReplace   elements with last  5 value. This does not alter the length of the list. :maybe_latch 1 [Nothing,Just 2,Nothing,Just 4] == [1,2,2,4]hmt-base'Variant requiring initial value is not  . 9maybe_latch1 [Just 1,Nothing,Nothing,Just 4] == [1,1,1,4]hmt-base  of  . 8maybe_map negate [Nothing,Just 2] == [Nothing,Just (-2)]hmt-base If either is   then  , else eq of values.hmt-base0Join two values, either of which may be missing.hmt-base of  hmt-baseApply predicate inside  . (maybe_predicate even (Just 3) == Nothinghmt-base  of . let r = [Nothing,Nothing,Nothing,Just 4] in maybe_filter even [Just 1,Nothing,Nothing,Just 4] == rhmt-base Variant of  '. If all elements of the list are Just a , then gives Just [a] else gives  . all_just (map Just [1..3]) == Just [1..3] all_just [Just 1,Nothing,Just 3] == Nothing   Safe-Inferred;hmt-base  of  .hmt-baseMonadic variant of  .hmt-base  of   of  hmt-baseIf i then j else k. Safe-Inferredhmt-base  gives different answers depending on whether there is a trailing separator. x = ["x/y","x/y/","x","/"] map parent_dir x == ["x","x",".","/"] map takeDirectory x == ["x","x/y",".","/"]hmt-baseColon separated path list.hmt-baseRead environment variable and split path. Error if enviroment variable not set. 5path_from_env "PATH" path_from_env "NONPATH" -- errorhmt-base8Expand a path to include all subdirectories recursively. p = ["/home/rohan/sw/hmt-base/Music", "/home/rohan/sw/hmt/Music"] r <- path_recursive p length r == 44hmt-baseScan a list of directories until a file is located, or not. Stop once a file is located, do not traverse any sub-directory structure. 4mapM (path_scan ["/sbin","/usr/bin"]) ["fsck","ghc"]hmt-baseErroring variant.hmt-baseScan a list of directories and return all located files. Do not traverse any sub-directory structure. Since 1.2.1.0 there is also findFiles. let path = ["/home/rohan/sw/hmt-base","/home/rohan/sw/hmt"] path_search path "README.md" findFiles path "README.md"hmt-baseGet sorted list of files at dir with ext, ie. ls dir/*.ext &dir_list_ext "/home/rohan/rd/j/" ".hs"hmt-base Post-process  to gives file-names with dir prefix. +dir_list_ext_path "/home/rohan/rd/j/" ".hs"hmt-baseSubset of files in dir with an extension in ext. Extensions include the leading dot and are case-sensitive. Results are relative to dir.hmt-base9Variant of dir_subset_rel where results have dir/ prefix. +dir_subset [".hs"] "/home/rohan/sw/hmt/cmd"hmt-baseSubdirectories (relative) of dir.hmt-baseSubdirectories of dir.hmt-baseRecursive form of . 7dir_subdirs_recursively "/home/rohan/sw/hmt-base/Music"hmt-base;If path is not absolute, prepend current working directory. to_absolute_cwd "x"hmt-baseIf i is an existing file then j else k.hmt-base  (including parents) and then  hmt-base only if file does not exist. Safe-Inferredhmt-base Minimum by f.hmt-base Specialised  .hmt-base Specialised  .hmt-baseInvert  . 'map ord_invert [LT,EQ,GT] == [GT,EQ,LT]hmt-baseGiven  , re-order pair,hmt-baseSort a pair of equal type values using given comparison function. (sort_pair compare ('b','a') == ('a','b')hmt-base>Variant where the comparison function may not compute a value. Safe-Inferredhmt-basePermutation given as a zero-indexed list of destination indices.hmt-baseFactorial function. (factorial 20,maxBound::Int)hmt-base Number of k" element permutations of a set of n elements. let f = nk_permutations in (f 3 2,f 3 3,f 4 3,f 4 4,f 13 3,f 12 12) == (6,6,24,24,1716,479001600)hmt-base Number of nk permutations where n   k. map n_permutations [1..8] == [1,2,6,24,120,720,5040,40320] n_permutations 12 == 479001600 n_permutations 16 `div` 1000000 == 20922789hmt-baseGenerate the permutation from p to q1, ie. the permutation that, when applied to p, gives q. p = permutation "abc" "bac" p == [1,0,2] apply_permutation p "abc" == "bac"hmt-base"Permutation to list of swaps, ie.   [0..] ;permutation_to_swaps [0,2,1,3] == [(0,0),(1,2),(2,1),(3,3)]hmt-base Inverse of , ie.        hmt-base List of cycles to list of swaps. cycles_to_swaps [[0,2],[1],[3,4]] == [(0,2),(1,1),(2,0),(3,4),(4,3)]hmt-baseApply permutation f to p. let p = permutation [1..4] [4,3,2,1] p == [3,2,1,0] apply_permutation p [1..4] == [4,3,2,1]hmt-baseComposition of  and . apply_permutation_c_zero_indexed [[0,3],[1,2]] [1..4] == [4,3,2,1] apply_permutation_c_zero_indexed [[0,2],[1],[3,4]] [1..5] == [3,2,1,5,4] apply_permutation_c_zero_indexed [[0,1,4],[2,3]] [1..5] == [2,5,4,3,1] apply_permutation_c_zero_indexed [[0,1,3],[2,4]] [1..5] == [2,4,5,1,3]hmt-baseTrue if the inverse of p is p. non_invertible [1,0,2] == True non_invertible [2,7,4,9,8,3,5,0,6,1] == False let p = permutation [1..4] [4,3,2,1] non_invertible p == True && p_cycles p == [[0,3],[1,2]]hmt-base'Generate a permutation from the cycles c (zero-indexed) apply_permutation (from_cycles_zero_indexed [[0,1,2,3]]) [1..4] == [2,3,4,1]hmt-base"Generate all permutations of size n (naive) let r = [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] map one_line (permutations_n 3) == rhmt-baseComposition of q then p. let p = from_cycles_zero_indexed [[0,2],[1],[3,4]] let q = from_cycles_zero_indexed [[0,1,4],[2,3]] let r = p `compose` q apply_permutation r [1,2,3,4,5] == [2,4,5,1,3]hmt-base One-indexed hmt-base  of  cycles_one_indexed (from_cycles_one_indexed [[1,5],[2,3,6],[4]] `permutation_mul` from_cycles_one_indexed [[1,6,4],[2],[3,5]])hmt-baseTwo line notation of p. ;two_line (permutation [0,1,3] [1,0,3]) == ([1,2,3],[2,1,3])hmt-baseOne line notation of p. 1one_line (permutation [0,1,3] [1,0,3]) == [2,1,3] let r = [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] map one_line (permutations_n 3) == rhmt-base Variant of  that produces a compact string. 7one_line_compact (permutation [0,1,3] [1,0,3]) == "213" let p = permutations_n 3 unwords (map one_line_compact p) == "123 132 213 231 312 321"hmt-base(Multiplication table of symmetric group n. unlines (map (unwords . map one_line_compact) (multiplication_table 3)) ==> 123 132 213 231 312 321 132 123 312 321 213 231 213 231 123 132 321 312 231 213 321 312 123 132 312 321 132 123 231 213 321 312 231 213 132 123  Safe-Inferred# hmt-base Number of k" element combinations of a set of n elements. map (uncurry nk_combinations) [(4,2),(5,3),(6,3),(13,3)] == [6,10,20,286]hmt-basek element subsets of s. combinations 3 [1..4] == [[1,2,3],[1,2,4],[1,3,4],[2,3,4]] length (combinations 3 [1..5]) == nk_combinations 5 3 combinations 3 "xyzw" == ["xyz","xyw","xzw","yzw"]hmt-base 7http://www.acta.sapientia.ro/acta-info/C1-1/info1-9.pdf (P.110) dyck_words_lex 3 == [[0,0,0,1,1,1],[0,0,1,0,1,1],[0,0,1,1,0,1],[0,1,0,0,1,1],[0,1,0,1,0,1]]hmt-baseTranslate 01 to []. unwords (map dyck_word_to_str (dyck_words_lex 3)) == "[[[]]] [[][]] [[]][] [][[]] [][][]"hmt-baseTranslate [] to 01hmt-baseIs x a segment of a lattice word.hmt-baseIs x a lattice word.)is_lattice_word [1,1,1,2,2,1,2,1] == Truehmt-base of  .hmt-base of  %is_dyck_word "[][[][[[][]]]]" == True   Safe-Inferred.hmt-base Transform   function into precise   function. Requires using all the input to produce a single token. The only exception is a singular trailing white space character.hmt-baseError variant of .hmt-base of  . =read_maybe "1.0" :: Maybe Int read_maybe "1.0" :: Maybe Floathmt-base Variant of  with default value. ,map (read_def 0) ["2","2:","2\n"] == [2,0,2]hmt-base Variant of  that errors on  , printing message.hmt-baseDefault message.hmt-base Variant of  0 requiring exact match, no trailing white space. 3map reads_exact ["1.5","2,5"] == [Just 1.5,Nothing]hmt-base Variant of  that errors on failure.hmt-base$Allow commas as thousand separators. let r = [Just 123456,Just 123456,Nothing,Just 123456789] map read_integral_allow_commas_maybe ["123456","123,456","1234,56","123,456,789"] == rhmt-baseType specialised. map read_int_allow_commas ["123456","123,456","123,456,789"] == [123456,123456,123456789]hmt-base,Read a ratio where the division is given by / instead of % and the integers allow commas. map read_ratio_with_div_err ["123,456/7","123,456,789"] == [123456/7,123456789]hmt-baseRead  ', allow commas for thousand separators. read_ratio_allow_commas_err "327,680" "177,147" == 327680 / 177147hmt-baseDelete trailing .,   fails for 700..hmt-base# disallows trailing decimal points. map read_fractional_allow_trailing_point_err ["123.","123.4"] == [123.0,123.4]hmt-baseType specialised . map read_maybe_int ["2","2:","2\n","x"] == [Just 2,Nothing,Just 2,Nothing]hmt-baseType specialised .hmt-baseType specialised .hmt-baseType specialised .hmt-baseType specialised . map read_maybe_rational ["1","1%2","1/2"] == [Nothing,Just (1/2),Nothing]hmt-baseType specialised . read_rational "1%4"hmt-baseRead binary integer. mapMaybe read_bin (words "000 001 010 011 100 101 110 111") == [0 .. 7]hmt-baseErroring variant.hmt-baseError variant of  . read_hex_err "F0B0" == 61616hmt-base&Read hex value from string of at most k places.hmt-base8Read hexadecimal representation of 32-bit unsigned word. map read_hex_word32 ["00000000","12345678","FFFFFFFF"] == [minBound,305419896,maxBound]hmt-base Parser for  rational_pp. map rational_parse ["1","3/2","5/4","2"] == [1,3/2,5/4,2] rational_parse "" == undefined Safe-Inferred4hmt-base Usage texthmt-base(Key,Default-Value,Type,Note)hmt-base (Key,Value)Key does not include leading '--'.hmt-base"Re-write default values at OptUsr.hmt-baseOptUsr to Opt.hmt-base,OptUsr to help string, indent is two spaces.hmt-base  of hmt-base)Lookup Key in Opt, error if non-existing.hmt-baseVariant that returns Nothing if the result is the empty string, else Just the result.hmt-base  of get_opthmt-base"Parse k or k=v string, else error.hmt-base5Parse option string of form "--opt" or "--key=value". opt_parse "--opt" == Just ("opt","True") opt_parse "--key=value" == Just ("key","value")hmt-base9Parse option sequence, collating options and non-options. opt_set_parse (words "--a --b=c d") == ([("a","True"),("b","c")],["d"])hmt-baseLeft-biased Opt merge.hmt-baseProcess argument list.hmt-baseFormat usage pre-amble and .hmt-basePrint help and exit.hmt-basePrint help and error.hmt-base0Verify that all Opt have keys that are in OptUsrhmt-base and maybe  and  of  +. If arguments include -h or --help run hmt-base(Parse param set, one parameter per line. 8opt_param_set_parse "a\nb=c" == [("a","True"),("b","c")]hmt-base"Simple scanner over argument list.hmt-baseScanner with default value.hmt-base#Reading scanner with default value. Safe-Inferred:Thmt-base  of hmt-base of  hmt-baseType-specialised  !map word8_to_char [60,62] == "<>"hmt-base of  hmt-base of  hmt-base  of hmt-baseat of hmt-baseGiven n* in (0,255) make two character hex string. 5mapMaybe byte_hex_pp [0x0F,0xF0,0xF0F] == ["0F","F0"]hmt-baseErroring variant.hmt-base either plain (ws = False) or with spaces (ws = True). Plain is the same format written by xxd -p and read by xxd -r -p. +byte_seq_hex_pp True [0x0F,0xF0] == "0F F0"hmt-base&Read two character hexadecimal string. mapMaybe read_hex_byte (Split.chunksOf 2 "0FF0F") == [0x0F,0xF0]hmt-baseErroring variant.hmt-base Sequence of  5read_hex_byte_seq "000FF0FF" == [0x00,0x0F,0xF0,0xFF]hmt-base!Variant that filters white space. ;read_hex_byte_seq_ws "00 0F F0 FF" == [0x00,0x0F,0xF0,0xFF]hmt-base Load binary U8 sequence from file.hmt-base Store binary U8 sequence to file.hmt-baseLoad hexadecimal text U8 sequences from file.hmt-baseStore U86 sequences as hexadecimal text, one sequence per line. Safe-InferredCd hmt-baseShow positive and negative values always with sign, maybe show zero, maybe right justify. map (num_diff_str_opt (True,2)) [-2,-1,0,1,2] == ["-2","-1"," 0","+1","+2"]hmt-baseShow only0 positive and negative values, always with sign. map num_diff_str [-2,-1,0,1,2] == ["-2","-1","","+1","+2"] map show [-2,-1,0,1,2] == ["-2","-1","0","1","2"]hmt-basePretty printer for   using / and eliding denominators of 1. 6map rational_pp [1,3/2,5/4,2] == ["1","3/2","5/4","2"]hmt-basePretty print ratio as : separated integers, if nil is True elide unit denominator. 4map (ratio_pp_opt True) [1,3/2,2] == ["1","3:2","2"]hmt-basePretty print ratio as : separated integers. -map ratio_pp [1,3/2,2] == ["1:1","3:2","2:1"]hmt-baseShow rational to n decimal places. let r = approxRational pi 1e-100 r == 884279719003555 / 281474976710656 show_rational_decimal 12 r == "3.141592653590" show_rational_decimal 3 (-100) == "-100.000"hmt-baseShow r as float to k places. real_pp 4 (1/3 :: Rational) == "0.3333" map (real_pp 4) [1,1.1,1.12,1.123,1.1234,1/0,sqrt (-1)]hmt-baseVariant that writes D for Infinity. 7putStrLn $ unwords $ map (real_pp_unicode 4) [1/0,-1/0]hmt-basePrints n as integral or to at most k# decimal places. Does not print -0. real_pp_trunc 4 (1/3 :: Rational) == "0.3333" map (real_pp_trunc 4) [1,1.1,1.12,1.123,1.1234] == ["1","1.1","1.12","1.123","1.1234"] map (real_pp_trunc 4) [1.00009,1.00001] == ["1.0001","1"] map (real_pp_trunc 2) [59.999,60.001,-0.00,-0.001]hmt-base Variant of  . The   instance for floats resorts to exponential notation very readily. [show 0.01,realfloat_pp 2 0.01] == ["1.0e-2","0.01"] map (realfloat_pp 4) [1,1.1,1.12,1.123,1.1234,1/0,sqrt (-1)]hmt-baseType specialised .hmt-baseType specialised .  double_pp 4 0hmt-baseRead binary integer. unwords (map (show_bin Nothing) [0 .. 7]) == "0 1 10 11 100 101 110 111" unwords (map (show_bin (Just 3)) [0 .. 7]) == "000 001 010 011 100 101 110 111"    Safe-InferredH} hmt-baseCase-insensitive  . *map (str_eq_ci "ci") (words "CI ci Ci cI")hmt-baseRemove r.hmt-baseDelete trailing   where   holds. delete_trailing_whitespace " str " == " str" delete_trailing_whitespace "\t\n \t\n" == ""hmt-base Variant of  - that does not write spaces for NIL elements. unwords_nil [] == "" unwords_nil ["a"] == "a" unwords_nil ["a",""] == "a" unwords_nil ["a","b"] == "a b" unwords_nil ["a","","b"] == "a b" unwords_nil ["a","","","b"] == "a b" unwords_nil ["a","b",""] == "a b" unwords_nil ["a","b","",""] == "a b" unwords_nil ["","a","b"] == "a b" unwords_nil ["","","a","b"] == "a b"hmt-base Variant of  2 that does not write empty lines for NIL elements.hmt-base#unlines without a trailing newline. unlines (words "a b c") == "a\nb\nc\n" unlinesNoTrailingNewline (words "a b c") == "a\nb\nc"hmt-base#Capitalise first character of word. %capitalise "freqShift" == "FreqShift"hmt-base!Downcase first character of word. 'unCapitalise "FreqShift" == "freqShift"hmt-base&Apply function at each line of string. 1on_lines reverse "ab\ncde\nfg" == "ba\nedc\ngf\n"  ! Safe-InferredO hmt-base-(HEADER,PAD-LEFT,EQ-WIDTH,COL-SEP,TBL-DELIM).Options are: has header pad text with space to left instead of right, make all columns equal width, column separator string, print table delimitershmt-base Tabular text.hmt-base Split table at indicated places. let tbl = [["1","2","3","4"],["A","B","E","F"],["C","D","G","H"]] table_split [2,2] tblhmt-baseJoin tables left to right. table_concat [[["1","2"],["A","B"],["C","D"]],[["3","4"],["E","F"],["G","H"]]]hmt-base2Add a row number column at the front of the table. table_number_rows 0 tblhmt-base Options for plain layout.hmt-base Options for simple layout.hmt-base Options for pipe layout.hmt-base+Pretty-print table. Table is in row order. let tbl = [["1","2","3","4"],["a","bc","def"],["ghij","klm","no","p"]] putStrLn$unlines$"": table_pp (True,True,True," ",True) tbl putStrLn$unlines$"": table_pp (False,False,True," ",False) tblhmt-baseVariant relying on   instances. 6table_pp_show table_opt_simple [[1..4],[5..8],[9..12]]hmt-baseVariant in column order (ie.  ). table_pp_column_order table_opt_simple [["a","bc","def"],["ghij","klm","no"]]hmt-baseMatrix form, ie. header in both first row and first column, in each case displaced by one location which is empty. let h = (map return "abc",map return "efgh") let t = table_matrix h (map (map show) [[1,2,3,4],[2,3,4,1],[3,4,1,2]])0putStrLn $ unlines $ table_pp table_opt_simple t - - - - - e f g h a 1 2 3 4 b 2 3 4 1 c 3 4 1 2 - - - - -hmt-baseVariant that takes a   function and a header decoration function. table_matrix_opt show id ([1,2,3],[4,5,6]) [[7,8,9],[10,11,12],[13,14,15]]  " Safe-InferredYhmt-baseDuration stored as hours, minutes, seconds and  milliseconds.hmt-baseConvert fractional seconds to integral (seconds,milliseconds). s_sms 1.75 == (1,750)hmt-base Inverse of . sms_s (1,750) == 1.75hmt-base  function for  tuple. The notation writes seconds fractionally, and allows hours and minutes to be elided if zero.hmt-base  function for . Allows either H:M:S.MS or M:S.MS or S.MS. read_duration "01:35:05.250" == Duration 1 35 5 250 read_duration "35:05.250" == Duration 0 35 5 250 read_duration "05.250" == Duration 0 0 5 250hmt-base  function for . Inverse of read_duration. Hours and minutes are always shown, even if zero. show_duration (Duration 1 35 5 250) == "01:35:05.250" show (Duration 1 15 0 000) == "01:15:00.000" show (Duration 0 0 3 500) == "00:00:03.500"hmt-base,If minutes is not in (0,59) then edit hours.hmt-base.If seconds is not in (0,59) then edit minutes.hmt-base4If milliseconds is not in (0,999) then edit seconds.hmt-base:Normalise duration so that all parts are in normal ranges.hmt-baseExtract / tuple applying filter function at each element :duration_to_tuple id (Duration 1 35 5 250) == (1,35,5,250)hmt-base Inverse of .hmt-baseDuration as fractional hours. =duration_to_hours (read "01:35:05.250") == 1.5847916666666668hmt-baseDuration as fractional minutes. 4duration_to_minutes (read "01:35:05.250") == 95.0875hmt-baseDuration as fractional seconds. 4duration_to_seconds (read "01:35:05.250") == 5705.25hmt-baseInverse of duration_to_hours. 2hours_to_duration 1.5847916 == Duration 1 35 5 250hmt-baseInverse of duration_to_minutes.hmt-baseInverse of duration_to_seconds.hmt-baseEmpty (zero) duration.hmt-base1Negate the leftmost non-zero element of Duration.hmt-baseDifference between two durations as a duration. Implemented by translation to and from Rational fractional hours. duration_diff (Duration 1 35 5 250) (Duration 0 25 1 125) == Duration 1 10 4 125 duration_diff (Duration 0 25 1 125) (Duration 1 35 5 250) == Duration (-1) 10 4 125 duration_diff (Duration 0 25 1 125) (Duration 0 25 1 250) == Duration 0 0 0 (-125)# Safe-Inferredq<hmt-baseFractional minutes and seconds (mm.ss, ie. 01.45 is 1 minute and 45 seconds).hmt-baseFractional seconds.hmt-baseFractional minute, ie. 1.50 is one and a half minutes, ie. 1 minute and 30 seconds, cf. hmt-baseFractional hour, ie. 1.50 is one and a half hours, ie. 1 hour and 30 minutes.hmt-baseFractional days.hmt-base(Days,Hours,Minutes,Seconds)hmt-base(Hours,Minutes,Seconds)hmt-baseGeneric MinCsechmt-base#Minutes, seconds, centi-seconds as (min,sec,csec)hmt-baseGeneric MinSechmt-baseMinutes, seconds as  (min,sec)hmt-base%Centi-seconds, zero-indexed, ie. 0-99hmt-baseSecond, zero-indexed, ie. 0-59hmt-baseMinute, zero-indexed, ie. 0-59hmt-baseHour, zero-indexed, ie. 0-23hmt-baseWeek, one-indexed, ie. 1-31hmt-baseWeek, one-indexed, ie. 1-52hmt-base  with  .hmt-base!Parse date in ISO-8601 extended ( YYYY-MM-DD ) or basic (YYYYMMDD) form. Time.toGregorian (Time.utctDay (parse_iso8601_date "2011-10-09")) == (2011,10,09) Time.toGregorian (Time.utctDay (parse_iso8601_date "20190803")) == (2019,08,03)hmt-baseFormat date in ISO-8601 form. format_iso8601_date True (parse_iso8601_date "2011-10-09") == "2011-10-09" format_iso8601_date False (parse_iso8601_date "20190803") == "20190803"hmt-baseFormat date in ISO-8601 (YYYY-WWW) form. r = ["2016-W52","2011-W40"] map (format_iso8601_week . parse_iso8601_date) ["2017-01-01","2011-10-09"] == rhmt-base!Parse ISO-8601 time is extended (HH:MM:SS ) or basic (HHMMSS) form. format_iso8601_time True (parse_iso8601_time "21:44:00") == "21:44:00" format_iso8601_time False (parse_iso8601_time "172511") == "172511"hmt-baseFormat time in ISO-8601 form. format_iso8601_time True (parse_iso8601_date_time "2011-10-09T21:44:00") == "21:44:00" format_iso8601_time False (parse_iso8601_date_time "20190803T172511") == "172511"hmt-base/Parse date and time in extended or basic forms. Time.utctDayTime (parse_iso8601_date_time "2011-10-09T21:44:00") == Time.secondsToDiffTime 78240 Time.utctDayTime (parse_iso8601_date_time "20190803T172511") == Time.secondsToDiffTime 62711hmt-baseFormat date in  YYYY-MM-DD and time in HH:MM:SS forms. t = parse_iso8601_date_time "2011-10-09T21:44:00" format_iso8601_date_time True t == "2011-10-09T21:44:00" format_iso8601_date_time False t == "20111009T214400"hmt-base .   60 fmin_to_minsec 6.48 == (6,29)hmt-base,Translate fractional seconds to picoseconds. fsec_to_picoseconds 78240.05hmt-base4Translate fractional minutes.seconds to picoseconds. /map fminsec_to_fsec [0.45,15.355] == [45,935.5]hmt-baseFractional minutes are mm.ss, so that 15.35 is 15 minutes and 35 seconds. +map fminsec_to_sec [0.45,15.35] == [45,935]hmt-baseType specialised   of  .hmt-base+Fractional hour to (hours,minutes,seconds). fhour_to_hms 21.75 == (21,45,0)hmt-baseHms to fractional hours. hms_to_fhour (21,45,0) == 21.75hmt-baseFractional hour to seconds. fhour_to_fsec 21.75 == 78300.0hmt-baseTime in fractional days. round (utctime_to_fday (parse_iso8601_date_time "2011-10-09T09:00:00")) == 55843 round (utctime_to_fday (parse_iso8601_date_time "2011-10-09T21:00:00")) == 55844hmt-base  in fractional seconds. 6difftime_to_fsec (hms_to_difftime (21,44,30)) == 78270hmt-base  in fractional minutes. 7difftime_to_fmin (hms_to_difftime (21,44,30)) == 1304.5hmt-base  in fractional hours. 7difftime_to_fhour (hms_to_difftime (21,45,00)) == 21.75hmt-base#Seconds to (hours,minutes,seconds). map sec_to_hms [60-1,60+1,60*60-1,60*60+1] == [(0,0,59),(0,1,1),(0,59,59),(1,0,1)]hmt-base pretty printer. ;map (hms_pp True) [(0,1,2),(1,2,3)] == ["01:02","01:02:03"]hmt-base  by 60. sec_to_minsec 123 == (2,3)hmt-base Inverse of  sec_minsec. minsec_to_sec (2,3) == 123hmt-baseConvert p and q to seconds, apply f, and convert back to .hmt-base   , assumes q precedes p. "minsec_sub (2,35) (1,59) == (0,36)hmt-base   , assumes p precedes q. #minsec_diff (1,59) (2,35) == (0,36)hmt-base  . "minsec_add (1,59) (2,35) == (4,34)hmt-base  of  +minsec_sum [(1,59),(2,35),(4,34)] == (9,08)hmt-base  fractional seconds to  (min,sec). ;map fsec_to_minsec [59.49,60,60.51] == [(0,59),(1,0),(1,1)]hmt-base pretty printer. =map (minsec_pp . fsec_to_minsec) [59,61] == ["00:59","01:01"]hmt-baseFractional seconds to (min,sec,csec), csec value is  ed. >map fsec_to_mincsec [1,1.5,4/3] == [(0,1,0),(0,1,50),(0,1,33)]hmt-base Inverse of  fsec_mincsec.hmt-baseCenti-seconds to . 6map csec_to_mincsec [123,12345] == [(0,1,23),(2,3,45)]hmt-base; pretty printer, concise mode omits centiseconds when zero. map (mincsec_pp_opt True . fsec_to_mincsec) [1,60.5] == ["00:01","01:00.50"]hmt-base pretty printer. let r = ["00:01.00","00:06.67","02:03.45"] map (mincsec_pp . fsec_to_mincsec) [1,6+2/3,123.45] == rhmt-base2Convert seconds into (days,hours,minutes,seconds).hmt-baseType specialised . "sec_to_dhms 1475469 == (17,1,51,9)hmt-base Inverse of seconds_to_dhms. "dhms_to_sec (17,1,51,9) == 1475469hmt-baseGeneric form of .hmt-baseParse DHms text. All parts are optional, order is not significant, multiple entries are allowed. parse_dhms "17d1h51m9s" == (17,1,51,9) parse_dhms "1s3d" == (3,0,0,1) parse_dhms "1h1h" == (0,2,0,0)hmt-base Week that t lies in. map (time_to_week . parse_iso8601_date) ["2017-01-01","2011-10-09"] == [52,40]hmt-base&Given printer, pretty print time span.$ Safe-Inferredw#hmt-baseReplace elements at  0 with result of joining with elements from list. let t = Tree.Node 0 [Tree.Node 1 [Tree.Node 2 [],Tree.Node 3 []],Tree.Node 4 []] putStrLn $ Tree.drawTree (fmap show t) let (_,u) = adopt_shape (\_ x -> x) "abcde" t putStrLn $ Tree.drawTree (fmap return u)hmt-baseTwo-level variant of . adopt_shape_2 (,) [0..4] (words "a bc d") == ([4],[[('a',0)],[('b',1),('c',2)],[('d',3)]])hmt-base6Adopt stream to shape of traversable and zip elements. =adopt_shape_2_zip_stream [1..] ["a", "list", "of", "strings"]hmt-baseTwo-level variant of   [1..] list_number_2 ["number","list","two"] == [[(1,'n'),(2,'u'),(3,'m'),(4,'b'),(5,'e'),(6,'r')],[(7,'l'),(8,'i'),(9,'s'),(10,'t')],[(11,'t'),(12,'w'),(13,'o')]]hmt-base Variant of  that considers only   elements at  . let s = "a(b(cd)ef)ghi" let t = group_tree (begin_end_cmp_eq '(' ')') s adopt_shape_m (,) [1..13] t% Safe-Inferredwhmt-basePrint forest as markdown list.hmt-basePrint tree as markdown list with indicated starting indent level.& Safe-Inferredz\ hmt-baseUniform two-tuple.hmt-baseSwap elements of P2 p2_swap (1,2) == (2,1)hmt-base  . "t2_join ([1,2],[3,4]) == [1,2,3,4]hmt-base   of  6t2_concat [("ab","cd"),("ef","gh")] == ("abef","cdgh")hmt-base t2_sort (2,1) == (1,2)hmt-base hmt-base hmt-base hmt-baseLeft rotation. !p3_rotate_left (1,2,3) == (2,3,1)hmt-base  of . 1t12_foldr1 (+) (1,2,3,4,5,6,7,8,9,10,11,12) == 78hmt-base  of . *t12_sum (1,2,3,4,5,6,7,8,9,10,11,12) == 78' Safe-InferredNhmt-base-Lgl is an adjaceny set with optional weights.hmt-base  ncol-entryhmt-base (edge,weight)hmt-baseParse  from  hmt-baseLoad  from .ncol file.hmt-baseType-specialised.hmt-baseFormat Ncol_Ent. ncol_ent_format 4 ((0,1),Nothing) == "0 1" ncol_ent_format 4 ((0,1),Just 2.0) == "0 1 2.0000"hmt-baseStore  of   to .ncol filehmt-baseType-specialised.hmt-baseNcol data must be un-directed and have no self-arcs. This function sorts edges (i,j) so that i <= j and deletes edges where i == j.hmt-baseeset (edge-set) to Ncol (runs )hmt-base Inverse of ,   if  is weightedhmt-base of hmt-baseFormat 5, k is floating point precision for optional weights.hmt-base  of hmt-baseadj (adjaceny-set) to .hmt-base Inverse of ,   if  is weightedhmt-base of ( Safe-Inferredhmt-baseCSV table, ie. a Table with   a header.hmt-base CSV options.hmt-baseWhen writing a CSV file should the delimiters be aligned, ie. should columns be padded with spaces, and if so at which side of the data?hmt-base Alias for  , allow linebreaks in fields.hmt-base Alias for  , allow characters other than , as delimiter.hmt-base2When reading a CSV file is the first row a header?hmt-baseQuoting is required is the string has a double-quote, comma newline or carriage-return.hmt-baseQuoting places double-quotes at the start and end and escapes double-quotes.hmt-baseQuote field if required.hmt-baseDefault CSV options, no header, comma delimiter, no linebreaks, no alignment.hmt-baseRead  from CSV file.hmt-baseRead  only with .hmt-baseRead plain CSV .hmt-baseRead and process CSV .hmt-baseAlign table according to . csv_table_align Csv_No_Align [["a","row","and"],["then","another","one"]]hmt-base Pretty-print .hmt-base_ of .hmt-baseWrite Table only (no header) with .hmt-baseWrite plain CSV Table.hmt-base0"-indexed (row,column) cell lookup.hmt-base Row data.hmt-base Column data.hmt-baseLookup value across columns.hmt-baseTable cell lookup.hmt-base04-indexed (row,column) cell lookup over column range.hmt-baseRange of cells from row.hmt-base Translate Table to Array. It is assumed that the Table; is regular, ie. all rows have an equal number of columns. let a = table_to_array [[0,1,3],[2,4,5]] in (bounds a,indices a,elems a) > (((A,1),(C,2)) > ,[(A,1),(A,2),(B,1),(B,2),(C,1),(C,2)] > ,[0,2,1,4,3,5])hmt-base of .hmt-baseRead irregular CSV file, ie. rows may have any number of columns, including no columns.,,) Safe-Inferred>hmt-base%Unicode non breaking hypen character. non_breaking_hypen == '@'hmt-base%Unicode non breaking space character. non_breaking_space == ''hmt-baseUnicode interpunct. middle_dot == ''hmt-base*The superscript variants of the digits 0-9hmt-baseMap   of   to . unwords (map int_show_superscript [0,12,345,6789]) == "@  @@ @@@@"hmt-base(The subscript variants of the digits 0-9hmt-base"The combining over line character. ['1',combining_overline] == "1" ['A',combining_overline] == "A"hmt-baseAdd  to each  . overline "1234" == "1234"hmt-base#The combining under line character. !['1',combining_underline] == "1"hmt-baseAdd  to each  . underline "1234" == "1234" hmt-base 4http://unicode.org/Public/11.0.0/ucd/UnicodeData.txt let fn = "/home/rohan/data/unicode.org/Public/11.0.0/ucd/UnicodeData.txt" tbl <- unicode_data_table_read fn length tbl == 32292 T.reverse_lookup_err "MIDDLE DOT" tbl == 0x00B7 putStrLn $ unwords $ map (\(n,x) -> toEnum n : x) $ filter (\(_,x) -> "EMPTY SET" `isInfixOf` x) tbl T.lookup_err 0x22C5 tbl == "DOT OPERATOR" hmt-baseUNICODE barline symbols. 8let r = "" in map (toEnum . fst) barlines_tbl == r hmt-baseUNICODE accidental symbols. let r = "LLL" in map (toEnum . fst) accidentals_tbl == r hmt-baseUNICODE note duration symbols. 8let r = "ܢݢޢߢ" in map (toEnum . fst) notes_tbl == r hmt-baseUNICODE rest symbols. 7let r = "¢" in map (toEnum . fst) rests_tbl == r hmt-baseAugmentation dot. -map toEnum [0x1D15E,0x1D16D,0x1D16D] == "ޢ" hmt-baseUNICODE clef symbols. 8let r = "" in map (toEnum . fst) clefs_tbl == r hmt-baseUNICODE notehead symbols. let r = "âĢŢƢǢȢɢʢˢ̢͢΢ϢТѢҢӢԢբ֢עآ٢ڢۢ" in map (toEnum . fst) noteheads_tbl == r hmt-baseUnicode dot-operator. dot_operator == 'E' hmt-base(Math symbols outside of the math blocks. =putStrLn (unicode_table_hs (ix_set_to_tbl tbl math_plain_ix)) hmt-baseBagua tri-grams. putStrLn $ unicode_table_hs (unicode_table_block (fst bagua) tbl) hmt-baseTable of eight tri-grams.HEAVEN,,Qin,L,111 LAKE,̢,Du,L,110 FIRE,,L,L,101 THUNDER,,Zhn,L,100 WIND,,Xn,L,011 WATER,ή,Kn,L,010 MOUNTAIN,,Gn,L,001 EARTH,,Kn,L,000 hmt-base&Yijing hexagrams in King Wen sequence. putStrLn $ unicode_table_hs (unicode_table_block (fst yijing) tbl) hmt-base&Yijing hexagrams in King Wen sequence.,,qin,111,111 ,,kn,000,000 ›,,chn,100,010 Û,,mng,010,001 ě,,x,111,010 ś,,sng,010,111 ƛ,,sh,010,000 Ǜ,,b,000,010 ț,,xio ch,111,011 ɛ,,l,110,111 ʛ,,ti,111,000 ˛,,p,000,111 ̛,,tng rn,101,111 ͛,,d yu,111,101 Λ,,qin,001,000 ϛ,,y,000,100 Л,,su,100,110 ћ,,g,011,001 қ,,ln,110,000 ӛ,,gun,000,011 ԛ,ѫ,sh k,100,101 ՛,,b,101,001 ֛,ݤ,b,000,001 כ,,f,100,000 ؛,,w wng,100,111 ٛ,,d ch,111,001 ڛ,,y,100,001 ۛ,Π,d gu,011,110 ܛ,ή,kn,010,010 ݛ,,l,101,101 ޛ,,xin,001,110 ߛ,,hng,011,100 ,,dn,001,111 ,,d zhung,111,100 ,,jn,000,101 ,,mng y,101,000 ,,ji rn,101,011 ,,ku,110,101 ,ǜ,jin,001,010 ,,xi,010,100 ,,sn,110,001 ,,y,100,011 ,,gui,111,110 ,,gu,011,111 ,,cu,000,110 ,Ǧ,shng,011,000 ,,kn,010,110 ,,jng,011,010 ,,g,101,110 ,,dng,011,101 ,,zhn,100,100 ,,gn,001,001 ,,jin,001,011 ,,gu mi,110,100 ,И,fng,101,100 ,,l,001,101 ,,xn,011,011 ,̢,du,110,110 ,,hun,010,011 ,,ji,110,010 ,ڶ,zhng f,110,011 ,Π,xio gu,001,110 ,,j j,101,010 ,,wi j,010,1010 0  34567889:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~            2                                                                                                                                                                                                                                                                          !!!!!!!!!!!!!"""""""""""""""""""""""""""""###########################################################################$$$$$%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''((((((((((((( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )    / / / /                        $hmt-base-0.20-KWCMT0MACddIjD7Vf7fWbmMusic.Theory.Array.Cell_RefMusic.Theory.BitsMusic.Theory.BoolMusic.Theory.ConcurrentMusic.Theory.Directory.FindMusic.Theory.EitherMusic.Theory.EnumMusic.Theory.FunctionMusic.Theory.IoMusic.Theory.ListMusic.Theory.Graph.TypeMusic.Theory.Graph.LcfMusic.Theory.Graph.BlissMusic.Theory.Graph.G6Music.Theory.Graph.PlanarMusic.Theory.ArrayMusic.Theory.MapMusic.Theory.Math.ConstantMusic.Theory.Math.ConvertMusic.Theory.MathMusic.Theory.Math.HistogramMusic.Theory.MaybeMusic.Theory.MonadMusic.Theory.DirectoryMusic.Theory.OrdMusic.Theory.PermutationsMusic.Theory.CombinationsMusic.Theory.ReadMusic.Theory.OptMusic.Theory.ByteMusic.Theory.ShowMusic.Theory.StringMusic.Theory.Array.TextMusic.Theory.Time.DurationMusic.Theory.Time.NotationMusic.Theory.TraversableMusic.Theory.TreeMusic.Theory.TupleMusic.Theory.Graph.LglMusic.Theory.Array.CsvMusic.Theory.UnicodeData.IxindexrangeinRange rangeSize Data.Eitherrights Data.Vectorslice Cell_RangeCell_Ref Row_RangeRow_Ref Column_Range Column_Refcolumn_ref_string row_index letter_index index_letter column_indexinterior_column_index column_refcolumn_ref_predcolumn_ref_succcolumn_indices column_rangecolumn_in_rangecolumn_range_size row_rangecell_ref_minimaparse_cell_ref is_cell_refparse_cell_ref_err cell_ref_pp cell_index index_to_cellparse_cell_index cell_rangecell_range_row_order$fIxColumn_Ref$fEnumColumn_Ref$fOrdColumn_Ref$fEqColumn_Ref$fShowColumn_Ref$fReadColumn_Refbit_ppbits_pp gen_bitseq pack_bitseq gen_bitseq_pp ifThenElsecaseElse caseOfElsethreadDelaySecondsthreadDelaySecondsLimitthreadSleepForSecondsdir_find dir_find_1 dir_find_extdir_find_ext_relpath_scan_recursivelypath_search_recursively from_left from_left_err from_rightfrom_right_err either_swap all_righteither_to_maybeis_leftis_rightpartition_eithersgenericFromEnum genericToEnumenum_from_to_cyclicenum_from_to_reverse enum_univenum_list_gaps enum_set_gapsBinOpUOprecur_nconst2 predicate_and predicate_all predicate_or predicate_anyeq_onfmap2fmap3fmap4fmap5fmap6.:.::.:::.::::.:::::bimap1fbimap1read_file_utf8_textread_file_utf8read_file_utf8_orwrite_file_utf8read_file_iso_8859_1read_file_localeinteractWithFilesgetLineFromStdinIfReadygetAvailableLinesFromStdininteractWithStdio Compare_Fsectionbracket bracket_l unbracket_el unbracket unbracket_err separate_atsplit_when_keeping_left split_beforesplit_before_any split_on_1split_on_1_errsplit1 split1_errsplit_into_halvesgenericRotate_left rotate_leftgenericRotate_right rotate_rightrotaterotate_r rotationsrotate_starting_fromrotate_starting_from_erradj adj_truncadj_cyclic_trunc genericAdj2adj2close adj2_cyclicadj3 adj3_cyclicadj4 interleaveinterleave_set deinterleave deinterleave2interleave_continueinterleave_rotationsrezipgeneric_histogram_by histogram_bygeneric_histogram histogramhistogram_joinhistogram_mergehistogram_fillhistogram_compositehistogram_diff duplicates_by duplicatessegments intersect_lunion_l adj_intersectcycles filter_halt filter_maybe filterInRangereplace replace_at strip_prefixstrip_prefix_err group_by_ongroup_oncollate_by_on_adjacentcollate_on_adjacentcollate_adjacentsort_on collate_oncollate uncollatewith_key assoc_mergeord_map_locatedx_ddx_d'd_dx_byd_dx difference is_subsetis_proper_subset is_superset subsequence findIndex_err elemIndex_errelem_index_uniquelookup_err_msg lookup_err lookup_def non_empty lookup_setlookup_set_errreverse_lookupreverse_lookup_errfind_errfind_bounds_cmpdecide_nearest_fdecide_nearestfind_nearest_byfind_nearest_err find_nearestfind_bounds_scl find_bounds drop_last dropRightdropWhileRightdrop_while_enddrop_while_right take_righttakeWhileRighttake_while_right maybe_take take_untilat_headat_lastseparate_last' separate_lastindicate_repetitions zip_with_adjcompare_adjacent_bycompare_adjacentheadTail firstSecondadjacent_groupBy group_ranges group_just all_equalall_eqnub_on sort_group_onmconssnoctwo_stage_comparetwo_stage_compare_onn_stage_comparen_stage_compare_onsort_to sort_to_revsort_by_two_stagesort_by_n_stagesort_by_two_stage_onsort_by_n_stage_onmerge_bymerge_onmerge_by_two_stagemerge merge_set_by merge_setmerge_by_resolveasc_seq_left_biased_merge_byfind_adj is_ascendingis_non_descending elem_orderedelemIndex_orderedzip_with_maybe zip_with_extzip_ext zip_with_krzip_with_perhaps_rhszip_list_with_list_of_listfill_gaps_ascendingfill_gaps_ascending' minimumBy_orminmax pad_right pad_right_errpad_right_no_truncatepad_left embedding embedding_err is_embeddingunlist1 unlist1_err group_tree remove_ix delete_at operate_ixs select_ixs remove_ixs replace_ixlist_eq_ignoring_indiceslist_set_indices list_set_ix at_cyclic atFromEndLbl_LblLbl_GrAdj_MtxAdjEdgGGr v_is_normalv_is_normal_err e_eq_undire_sortgr_map gr_degree gr_relabel gr_mk_undir eset_to_grgr_sortgr_complete_graph g_to_text graph_to_g g_to_graph gr_unlabelgr_to_g gr_to_graphg_complete_graphg_to_edgedg_to_g edg_parse adj_to_eset adj_to_gr gr_to_adj gr_to_adj_dirgr_to_adj_undiredg_to_adj_mtx_undirg_to_adj_mtx_undir adj_mtx_con lbl_degree lbl_bimap lbl_merge lbl_merge_seq lbl_canonical lbl_undirlbl_path_graphlbl_complete_graphv_label v_label_erre_label e_label_err lbl_gr_to_lbl gr_to_lbllbl_delete_edge_labels gr_to_lbl_ eset_to_lbllbl_to_gRLcflcf_seq lcf_degree lcf_to_edg edg_circ_gr lcf_mw_setBlissbliss_parse_problembliss_parse_vertex_colourbliss_parse_edge bliss_parse bliss_load bliss_to_gg6_load g6_dsc_load g6_to_edgg6_to_gg6_dsc_load_edgg6_dsc_load_gr adj_mtx_to_am adj_mtx_to_g6g_to_g6 g_store_g6 g6_labelgg_labelgPlcplc_header_txt plc_headerplc_data plc_length plc_scannerplc_n_vertices plc_group plc_segment plc_parseplc_load plc_edge_set plc_next_elem plc_next_edge plc_face_from plc_face_setplc_to_gplc_stat plc_stat_txt g6_planargg_to_plc g6_to_pl_wrIx DimensionsTable larray_boundslarraytbl_rows tbl_columnstbl_is_regulartbl_make_regulartbl_make_regular_nil ix_translate ix_modulo row_indicescolumn_indices_atmatrix_indicesmatrix_corner_indicesparallelogram_corner_indicesall_ix_translationsall_ix_translations_uniqmap_lookup_errmap_ix map_ix_err epsilonValuelargestFiniteValuesmallestNormalizedValue real_to_floatreal_to_doubledouble_to_floatfloat_to_doubledouble_to_word8 double_to_intint_to_rationalword8_to_word16word8_to_word32word8_to_word64 word8_to_int8word8_to_int16word8_to_int32word8_to_int64 word8_to_intword8_to_integerword8_to_floatword8_to_doubleword16_to_word8word16_to_word32word16_to_word64word16_to_int8word16_to_int16word16_to_int32word16_to_int64 word16_to_intword16_to_integerword16_to_floatword16_to_doubleword32_to_word8word32_to_word16word32_to_word64word32_to_int8word32_to_int16word32_to_int32word32_to_int64 word32_to_intword32_to_integerword32_to_floatword32_to_doubleword64_to_word8word64_to_word16word64_to_word32word64_to_int8word64_to_int16word64_to_int32word64_to_int64 word64_to_intword64_to_integerword64_to_floatword64_to_double int8_to_word8int8_to_word16int8_to_word32int8_to_word64 int8_to_int16 int8_to_int32 int8_to_int64 int8_to_intint8_to_integer int8_to_floatint8_to_doubleint16_to_word8int16_to_word16int16_to_word32int16_to_word64 int16_to_int8int16_to_int32int16_to_int64 int16_to_intint16_to_integerint16_to_floatint16_to_doubleint32_to_word8int32_to_word16int32_to_word32int32_to_word64 int32_to_int8int32_to_int16int32_to_int64 int32_to_intint32_to_integerint32_to_floatint32_to_doubleint64_to_word8int64_to_word16int64_to_word32int64_to_word64 int64_to_int8int64_to_int16int64_to_int32 int64_to_intint64_to_integerint64_to_floatint64_to_doubleint_to_integral int_to_word8 int_to_word16 int_to_word32 int_to_word64 int_to_int8 int_to_int16 int_to_int32 int_to_int64int_to_integer int_to_float int_to_doubleinteger_to_word8integer_to_word16integer_to_word32integer_to_word64integer_to_int8integer_to_int16integer_to_int32integer_to_int64integer_to_intinteger_to_floatinteger_to_doubleword8_to_word16_maybeword8_to_word32_maybeword8_to_word64_maybeword8_to_int8_maybeword8_to_int16_maybeword8_to_int32_maybeword8_to_int64_maybeword8_to_int_maybeword16_to_word8_maybeword16_to_word32_maybeword16_to_word64_maybeword16_to_int8_maybeword16_to_int16_maybeword16_to_int32_maybeword16_to_int64_maybeword16_to_int_maybeword32_to_word8_maybeword32_to_word16_maybeword32_to_word64_maybeword32_to_int8_maybeword32_to_int16_maybeword32_to_int32_maybeword32_to_int64_maybeword32_to_int_maybeword64_to_word8_maybeword64_to_word16_maybeword64_to_word32_maybeword64_to_int8_maybeword64_to_int16_maybeword64_to_int32_maybeword64_to_int64_maybeword64_to_int_maybeint8_to_word8_maybeint8_to_word16_maybeint8_to_word32_maybeint8_to_word64_maybeint8_to_int16_maybeint8_to_int32_maybeint8_to_int64_maybeint8_to_int_maybeint16_to_word8_maybeint16_to_word16_maybeint16_to_word32_maybeint16_to_word64_maybeint16_to_int8_maybeint16_to_int32_maybeint16_to_int64_maybeint16_to_int_maybeint32_to_word8_maybeint32_to_word16_maybeint32_to_word32_maybeint32_to_word64_maybeint32_to_int8_maybeint32_to_int16_maybeint32_to_int64_maybeint32_to_int_maybeint64_to_word8_maybeint64_to_word16_maybeint64_to_word32_maybeint64_to_word64_maybeint64_to_int8_maybeint64_to_int16_maybeint64_to_int32_maybeint64_to_int_maybeint_to_word8_maybeint_to_word16_maybeint_to_word32_maybeint_to_word64_maybeint_to_int8_maybeint_to_int16_maybeint_to_int32_maybeint_to_int64_maybeinteger_to_word8_maybeinteger_to_word16_maybeinteger_to_word32_maybeinteger_to_word64_maybeinteger_to_int8_maybeinteger_to_int16_maybeinteger_to_int32_maybeinteger_to_int64_maybeinteger_to_int_maybemod5mod7mod12mod16integral_and_fractional_partsinteger_and_fractional_partsfractional_part real_floorreal_floor_int real_roundreal_round_int round_intfrom_integral_to_intint_idzero_to_precisionwhole_to_precision sawtooth_waverational_simplifies rational_ndrational_wholerational_whole_err ratio_nd_sum real_is_wholefloor_fround_torecip_moi_mod oi_divMod i_square_rootin_open_intervalin_closed_intervalin_left_half_open_intervalin_right_half_open_intervalnth_rootarithmetic_meanns_meansquaretotientfarey farey_lengthstern_brocot_tree_fstern_brocot_treestern_brocot_tree_lhsstern_brocot_tree_f_r outer_product bHistogrambHistogramRange from_just maybe_unzip maybe_latch maybe_latch1 maybe_map maybe_eq_by maybe_join' maybe_joinmaybe_predicate maybe_filterall_justrepeatM_ iterateM_ concatMapMm_if parent_dir path_split path_from_envpath_recursive path_scan path_scan_err path_search dir_list_extdir_list_ext_pathdir_subset_rel dir_subsetdir_subdirs_rel dir_subdirsdir_subdirs_recursivelyto_absolute_cwdif_file_existswriteFile_mkdirwriteFile_mkdir_xmin_by ord_to_int int_to_ord ord_invert order_pair sort_pair sort_pair_m Permutation factorialnk_permutationsn_permutations permutationpermutation_to_swapsswaps_to_permutationcycles_to_swapsswaps_to_cyclesapply_permutation apply_permutation_c_zero_indexed p_inversep_cyclesnon_invertiblefrom_cycles_zero_indexedfrom_cycles_one_indexedpermutations_np_sizecomposecycles_one_indexedpermutation_multwo_lineone_lineone_line_compactmultiplication_tablenk_combinations combinationsdyck_words_lexdyck_word_to_strdyck_word_from_stris_lattice_segmentis_lattice_wordis_yamanouchi_word is_dyck_wordreads_to_read_precisereads_to_read_precise_err read_mayberead_def read_err_msgread_err reads_exactreads_exact_err read_integral_allow_commas_mayberead_integral_allow_commas_errread_int_allow_commasread_ratio_with_div_errread_ratio_allow_commas_errdelete_trailing_point(read_fractional_allow_trailing_point_errread_maybe_intread_intread_maybe_double read_doubleread_maybe_rational read_rationalread_bin read_bin_err read_hex_err read_hex_szread_hex_word32rational_parseOptHelpOptUsrOptopt_usr_rw_def opt_plain opt_usr_helpopt_helpopt_get opt_get_nilopt_readopt_param_parse opt_parse opt_set_parse opt_mergeopt_proc opt_help_pp opt_usage opt_error opt_verify opt_get_argopt_param_set_parseopt_scan opt_scan_def opt_scan_read word8_to_enum enum_to_word8 word8_to_char char_to_word8digit_to_word8word8_to_digitword8_at byte_hex_ppbyte_hex_pp_errbyte_seq_hex_pp read_hex_byteread_hex_byte_errread_hex_byte_seqread_hex_byte_seq_ws load_byte_seqstore_byte_seqload_hex_byte_seqstore_hex_byte_seqcastFloatToWord32castWord32ToFloatcastDoubleToWord64castWord64ToDoublenum_diff_str_opt num_diff_str rational_pp ratio_pp_optratio_ppshow_rational_decimalreal_ppreal_pp_unicode real_pp_trunc realfloat_ppfloat_pp double_ppshow_bin str_eq_ci filter_crdelete_trailing_whitespace unwords_nil unlines_nilunlinesNoTrailingNewline capitalise unCapitaliseon_linesText_Table_Opt Text_Table table_split table_concattable_number_rowstable_opt_plaintable_opt_simpletable_opt_pipetable_pp table_pp_showtable_pp_column_order table_matrixtable_matrix_optDurationhoursminutesseconds millisecondss_smssms_sread_duration_tuple read_duration show_durationnormalise_minutesnormalise_secondsnormalise_millisecondsnormalise_durationduration_to_tupletuple_to_durationduration_to_hoursduration_to_minutesduration_to_secondshours_to_durationminutes_to_durationseconds_to_duration nil_durationnegate_duration duration_diff$fShowDuration$fReadDuration $fEqDurationFMinSecFSecFMinFHourFDayDhmsHmsGMinCsecMinCsecGMinSecMinSecCsecSecMinHourDayWeekparse_time_strformat_time_strparse_iso8601_dateformat_iso8601_dateformat_iso8601_weekparse_iso8601_timeformat_iso8601_timeparse_iso8601_date_timeformat_iso8601_date_timefmin_to_minsecfsec_to_picosecondsfsec_to_difftimefminsec_to_fsecfminsec_to_sec_genericfminsec_to_secfsec_to_fminsecsec_to_fminsec fminsec_add fminsec_sub fminsec_mulffloor fhour_to_hms hms_to_fhour fhour_to_fsecfhour_to_difftimeutctime_to_fdaydifftime_to_fsecdifftime_to_fmindifftime_to_fhourhms_to_difftime hms_to_sec sec_to_hmshms_pp hms_parse sec_to_minsec minsec_to_sec minsec_binop minsec_sub minsec_diff minsec_add minsec_sumfsec_to_minsec minsec_pp minsec_parsefsec_to_mincsecmincsec_to_fsecmincsec_to_cseccsec_to_mincsecmincsec_pp_opt mincsec_pp mincsec_binopsec_to_dhms_generic sec_to_dhms dhms_to_secparse_dhms_generic parse_dhms time_to_weekspan_pp adopt_shape adopt_shape_2adopt_shape_2_zip_stream list_number_2 adopt_shape_mmdForestmdTreeT12T11T10T9T8T7T6T5T4T3T2 p2_from_listp2_swap t2_from_list t2_to_listt2_swapt2_map t2_zipWitht2_infixt2_join t2_concatt2_sortt2_sumt2_mapMt2_mapM_p3_rotate_leftp3_fstp3_sndp3_third t3_from_list t3_to_listt3_rotate_leftt3_fstt3_sndt3_thirdt3_map t3_zipWitht3_infixt3_joint3_sortp4_fstp4_sndp4_third p4_fourthp4_zip t4_from_list t4_to_listt4_fstt4_sndt4_third t4_fourtht4_map t4_zipWitht4_infixt4_joinp5_fstp5_sndp5_third p5_fourthp5_fifth p5_from_list p5_to_list t5_from_list t5_to_listt5_mapt5_fstt5_snd t5_fourtht5_fiftht5_infixt5_joinp6_fstp6_sndp6_third p6_fourthp6_fifthp6_sixth t6_from_list t6_to_listt6_mapt6_sum t7_to_listt7_map t8_to_listt8_mapp8_third t9_to_list t9_from_listt9_map t10_to_listt10_map t11_to_listt11_map t12_to_list t12_from_list t12_foldr1t12_sumuncurry3uncurry4uncurry5uncurry6uncurry7uncurry8uncurry9 uncurry10 uncurry11 uncurry12 uncurry13 uncurry14 uncurry15 uncurry16 uncurry17 uncurry18 uncurry19 uncurry20LglNcolNcol_Ent ncol_parse ncol_load ncol_load_intncol_ent_format ncol_storencol_store_intncol_rewrite_eset eset_to_ncol ncol_to_esetncol_store_eset lgl_format lgl_store adj_to_lgl lgl_to_adj lgl_store_adj P5_Writer P5_Parser P2_Parser Csv_TableCsv_OptCsv_Align_Columns Csv_No_AlignCsv_Align_LeftCsv_Align_RightCsv_Allow_Linebreaks Csv_DelimiterCsv_Has_Headercsv_requires_quote csv_quotecsv_quote_if_req def_csv_optcsv_table_readcsv_table_read_defcsv_table_read_plaincsv_table_withcsv_table_align csv_table_ppcsv_table_writecsv_table_write_defcsv_table_write_plain table_lookup table_row table_columntable_column_lookup table_celltable_lookup_row_segmenttable_row_segmenttable_to_arraycsv_array_read csv_field_strcsv_error_recovercsv_row_recovercsv_load_irregularcsv_write_irregularcsv_write_irregular_defcsv_table_read_p2csv_table_read_p5csv_table_write_p5csv_table_read_t9 Unicode_Block Unicode_Table Unicode_Point Unicode_Range Unicode_Name Unicode_Indexnon_breaking_hypennon_breaking_space middle_dotsuperscript_digitsint_show_superscriptsubscript_digitscombining_overlineoverlinecombining_underline underlineunicode_data_table_readunicode_table_blockunicode_point_hsunicode_table_hs music_tblaccidentals_rng_set barlines_rng barlines_tblaccidentals_tbl notes_rng notes_tbl rests_rng rests_tblaugmentation_dot clefs_rng clefs_tbl noteheads_rng noteheads_tblstem dynamics_rng dynamics_tblarticulations_rngarticulations_tbl ix_set_to_tbl dot_operator math_plain_ixmath_plain_tblunicode_blocksbagua bagua_tblyijing yijing_tblbaseGHC.Enumpredsucc Data.MaybeisJustfromJustghc-prim GHC.TypesTrueFalseGHC.BasemapGHC.BitsBitsLeftEitherRighteither GHC.MaybeMaybefromEnumtoEnum enumFromTomaxBoundminBoundEnum Data.OldListsortconst GHC.Classes&& Data.Foldablefoldr1||any== Data.Functiononfmap.Data.Bifunctorbimap text-1.2.5.0Data.Text.Encoding decodeUtf8bytestring-0.11.3.1Data.ByteStringreadFile System.IOData.Text.InternalText$split-0.2.3.5-A5IMOoCzkYpJ1jiJkQlLqNData.List.Split.InternalssplitOn splitWhenGHC.ListbreakGHC.RealmodunzipzipcomparefoldrGHC.Num-foldl1 intersectunionfilter takeWhileNothingGHC.Errerror stripPrefixgroupBy Data.TuplefstsndsortOnData.Traversable mapAccumLnotflip isInfixOf findIndex elemIndex elemIndiceslookupJustfindabsnulldrop dropWhiletakezipWithnubnubByEQsortBy+data-ordlist-0.4.7.0-GzJjQWaTDBOERkXP9y6uBaData.List.OrderedmergeBymergeAll>=>elemmembermapMaybe catMaybesminimummaximumOrderingLTGTIntcontainers-0.6.5.1 Data.GraphGraphDouble writeFileGHC.ArrarrayData.Map.Internal realToFrac fromIntegralproperFractionfloorroundidgcd numerator denominator fromIntegerrecipdivMod%RationalRatio sequence_repeatiterateconcatmapMfilepath-1.4.2.2System.FilePath.Posix takeDirectorydirectory-1.3.6.2System.DirectorycreateDirectoryIfMissingreverseText.ParserCombinators.ReadPReadSGHC.ReadRead Text.ReadreadsreadNumericreadHexunlinesSystem.EnvironmentgetArgs Data.Char digitToIntGHC.Show intToDigit showFFloatShowChar GHC.UnicodeisSpaceunwords transposeshow time-1.11.1.1Data.Time.Format.ParseparseTimeOrErrorData.Time.Format.LocaledefaultTimeLocale*!Data.Time.Clock.Internal.DiffTimeDiffTimesubtract+foldl TraversablemappendmconcatsummapM_StringBool