Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "lists", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "A library of higher-order functions modeled after Haskell's Data.List module", | ||
@@ -5,0 +5,0 @@ "main": "lists.js", |
299
README.md
# [ l [ i [ s ] t ] s ] | ||
**Full Version** | **[Homepage](http://www.blenddit.com/lists)** | ||
**Full Version** | **[Homepage](http://kurtlocker.github.io/lists)** | ||
@@ -12,11 +12,16 @@ Lists is a library of JavaScript higher-order functions for working with arrays and strings. The library was inspired by Haskell's Data.List module by the powerful people over at [The University of Glasgow](http://www.gla.ac.uk/). You can view the original source [here](https://hackage.haskell.org/package/base-4.7.0.0/docs/src/Data-List.html). You could then scroll through each function closely and see a purposefully similar correlation between the Haskell implementation and [this](www.google.com) implementation. | ||
----- | ||
##Install | ||
## Install | ||
----- | ||
##Components | ||
## Components | ||
----- | ||
#Contents | ||
## Type Signature Legend | ||
Legend - **arr | []** : Array, **obj | {}** : Object, **str** : String, **num** : Number, **f** : Function, **x** : variable; | ||
* **arr | []** : Array | ||
* **obj | {}** : Object | ||
* **str** : String | ||
* **num** : Number | ||
* **f** : Function | ||
* **x** : variable | ||
@@ -37,8 +42,8 @@ A{ **1.** } B{ **tail** } C{ **arr|str -> [x]** } | ||
* 1. [`append`](#append) : arr|str -> arr|str|num -> [x]|str | ||
* 2. [`head`](#head) : arr|str -> x | ||
* 3. [`last`](#last) : arr|str -> x | ||
* 4. [`init`](#init) : arr|str -> [x] | ||
* 5. [`tail`](#tail) : arr|str -> [x] | ||
* 6. [`nil`](#nil) : arr|str -> boolean | ||
* [`append`](#append) : arr|str -> arr|str|num -> [x]|str | ||
2. [`head`](#head) : arr|str -> x | ||
3. [`last`](#last) : arr|str -> x | ||
4. [`init`](#init) : arr|str -> [x] | ||
5. [`tail`](#tail) : arr|str -> [x] | ||
6. [`nil`](#nil) : arr|str -> boolean | ||
@@ -49,9 +54,9 @@ ----- | ||
* 7. [`map`](#map) : [x] -> f -> [x] | ||
* 8. [`rev`](#rev) : [x] -> [x] | ||
* 9. [`intersperse`](#intersperse) : x -> [x] -> arr|str | ||
* 10. [`intercalate`](#intercalate) : [x] -> [[x]] -> [x] | ||
* 11. [`transpose`](#transpose) : [[x]] -> [[x]] | ||
* 12. [`subsequences`](#subsequences) : [x] -> [[x]] | ||
* 13. [`permutations`](#permutations) : [x]|str -> [[x]]|[str] | ||
* [`map`](#map) : [x] -> f -> [x] | ||
8. [`rev`](#rev) : [x] -> [x] | ||
9. [`intersperse`](#intersperse) : x -> [x] -> arr|str | ||
10. [`intercalate`](#intercalate) : [x] -> [[x]] -> [x] | ||
11. [`transpose`](#transpose) : [[x]] -> [[x]] | ||
12. [`subsequences`](#subsequences) : [x] -> [[x]] | ||
13. [`permutations`](#permutations) : [x]|str -> [[x]]|[str] | ||
@@ -62,18 +67,18 @@ ----- | ||
* 14. [`foldl`](#foldl) : x -> [x]|str -> f -> x | ||
* 15. [`foldl1`](#foldl1) : [x]|str -> f -> x | ||
* 16. [`foldr`](#foldr) : x -> [x]|str -> f -> x | ||
* 17. [`foldr1`](#foldr1) : [x]|str -> f -> x | ||
* 18. [`flatten`](#flatten) || [`concat`](#flatten) : [[x]]|[str] -> [x]|str | ||
* 19. [`concatMap`](#concatMap) : [x]|str -> f -> [x]|str | ||
* 20. [`and`](#and) : [boolean] -> boolean | ||
* 21. [`or`](#or) : [boolean] -> boolean | ||
* 22. [`any`](#any) : [x]|str -> f -> boolean | ||
* 23. [`all`](#all) : [x]|str -> f -> boolean | ||
* 24. [`sum`](#sum) : [num] -> num | ||
* 25. [`product`](#product) : [num] -> num | ||
* 26. [`maximum`](#maximum) : [num] -> num | ||
* 27. [`minimum`](#minimum) : [num] -> num | ||
* 28. [`maxList`](#maxList) : [[x]] -> [x] | ||
* 29. [`minList`](#minList) : [[x]] -> [x] | ||
* [`foldl`](#foldl) : x -> [x]|str -> f -> x | ||
15. [`foldl1`](#foldl1) : [x]|str -> f -> x | ||
16. [`foldr`](#foldr) : x -> [x]|str -> f -> x | ||
17. [`foldr1`](#foldr1) : [x]|str -> f -> x | ||
18. [`flatten`](#flatten) || [`concat`](#flatten) : [[x]]|[str] -> [x]|str | ||
19. [`concatMap`](#concatMap) : [x]|str -> f -> [x]|str | ||
20. [`and`](#and) : [boolean] -> boolean | ||
21. [`or`](#or) : [boolean] -> boolean | ||
22. [`any`](#any) : [x]|str -> f -> boolean | ||
23. [`all`](#all) : [x]|str -> f -> boolean | ||
24. [`sum`](#sum) : [num] -> num | ||
25. [`product`](#product) : [num] -> num | ||
26. [`maximum`](#maximum) : [num] -> num | ||
27. [`minimum`](#minimum) : [num] -> num | ||
28. [`maxList`](#maxList) : [[x]] -> [x] | ||
29. [`minList`](#minList) : [[x]] -> [x] | ||
@@ -84,10 +89,10 @@ ----- | ||
* 30. [`scanl`](#scanl) : x -> [x]|str -> f -> [x] | ||
* 31. [`scanr`](#scanr) : x -> [x]|str -> f -> [x] | ||
* 32. [`mapAccumL`](#mapAccumL) : x -> [x]|str -> f -> [x, [x]] | ||
* 33. [`mapAccumR`](#mapAccumR) : x -> [x]|str -> f -> [x, [x]] | ||
* 34. [`iterate`](#iterate) : x -> num -> f -> [x] | ||
* 35. [`replicate`](#replicate) : x -> num -> [x] | ||
* 36. [`cycle`](#cycle) : [x]|str -> num -> [x]|str | ||
* 37. [`unfold`](#unfold) : f -> f -> f -> x -> [x]|str | ||
* [`scanl`](#scanl) : x -> [x]|str -> f -> [x] | ||
31. [`scanr`](#scanr) : x -> [x]|str -> f -> [x] | ||
32. [`mapAccumL`](#mapAccumL) : x -> [x]|str -> f -> [x, [x]] | ||
33. [`mapAccumR`](#mapAccumR) : x -> [x]|str -> f -> [x, [x]] | ||
34. [`iterate`](#iterate) : x -> num -> f -> [x] | ||
35. [`replicate`](#replicate) : x -> num -> [x] | ||
36. [`cycle`](#cycle) : [x]|str -> num -> [x]|str | ||
37. [`unfold`](#unfold) : f -> f -> f -> x -> [x]|str | ||
@@ -98,84 +103,84 @@ ----- | ||
* 38. [`take`](#take) : num -> [x]|str -> [x] | ||
* 39. [`drop`](#drop) : num -> [x]|str -> [x] | ||
* 40. [`splitAt`](#splitAt) : num -> [x]|str -> [[x],[x]] | ||
* 41. [`takeWhile`](#takeWhile) : f -> [x]|str -> [x] | ||
* 42. [`dropWhile`](#dropWhile) : f -> [x]|str -> [x] | ||
* 43. [`span`](#span) : arr|str -> f -> [[x], [x]|str] | ||
* 44. [`break`](#break) : arr|str -> f -> [[x], [x]|str] | ||
* 45. [`stripPrefix`](#stripPrefix) : [num]|str -> [num]|str -> [num]|[str] | ||
* 46. group : Eq a => [a] -> [[a]] | ||
* 47. inits : [a] -> [[a]] | ||
* 48. tails : [a] -> [[a]] | ||
* 49. isPrefixOf : Eq a => [a] -> [a] -> Bool | ||
* 50. isSuffixOf : Eq a => [a] -> [a] -> Bool | ||
* 51. isInfixOf : Eq a => [a] -> [a] -> Bool | ||
* [`take`](#take) : num -> [x]|str -> [x] | ||
39. [`drop`](#drop) : num -> [x]|str -> [x] | ||
40. [`splitAt`](#splitAt) : num -> [x]|str -> [[x],[x]] | ||
41. [`takeWhile`](#takeWhile) : f -> [x]|str -> [x] | ||
42. [`dropWhile`](#dropWhile) : f -> [x]|str -> [x] | ||
43. [`span`](#span) : arr|str -> f -> [[x], [x]|str] | ||
44. [`break`](#break) : arr|str -> f -> [[x], [x]|str] | ||
45. [`stripPrefix`](#stripPrefix) : [num]|str -> [num]|str -> [num]|[str] | ||
46. group : Eq a => [a] -> [[a]] | ||
47. inits : [a] -> [[a]] | ||
48. tails : [a] -> [[a]] | ||
49. isPrefixOf : Eq a => [a] -> [a] -> Bool | ||
50. isSuffixOf : Eq a => [a] -> [a] -> Bool | ||
51. isInfixOf : Eq a => [a] -> [a] -> Bool | ||
**Searching Lists** | ||
* 52. elem : Eq a => a -> [a] -> Bool | ||
* 53. notElem : Eq a => a -> [a] -> Bool | ||
* 54. lookup : Eq a => a -> [(a, b)] -> Maybe b | ||
* 55. find : (a -> Bool) -> [a] -> Maybe a | ||
* 56. filter : (a -> Bool) -> [a] -> [a] | ||
* 57. partition : (a -> Bool) -> [a] -> ([a], [a]) | ||
* elem : Eq a => a -> [a] -> Bool | ||
53. notElem : Eq a => a -> [a] -> Bool | ||
54. lookup : Eq a => a -> [(a, b)] -> Maybe b | ||
55. find : (a -> Bool) -> [a] -> Maybe a | ||
56. filter : (a -> Bool) -> [a] -> [a] | ||
57. partition : (a -> Bool) -> [a] -> ([a], [a]) | ||
**Indexing Lists** | ||
* 58. bang : [a] -> Int -> a | ||
* 59. elemIndex : Eq a => a -> [a] -> Maybe Int | ||
* 60. elemIndices : Eq a => a -> [a] -> [Int] | ||
* 61. findIndex : (a -> Bool) -> [a] -> Maybe Int | ||
* 62. findIndices : (a -> Bool) -> [a] -> [Int] | ||
* bang : [a] -> Int -> a | ||
59. elemIndex : Eq a => a -> [a] -> Maybe Int | ||
60. elemIndices : Eq a => a -> [a] -> [Int] | ||
61. findIndex : (a -> Bool) -> [a] -> Maybe Int | ||
62. findIndices : (a -> Bool) -> [a] -> [Int] | ||
**Zipping and Unzipping Lists** | ||
* 63. zip || unzip : [[a],[b],..,[n]] -> [[a,b,..,n]] | ||
* 64. zipWith : (a -> b -> c) -> [[a],[b],..,[n]] -> [c,..,n] | ||
* zip || unzip : [[a],[b],..,[n]] -> [[a,b,..,n]] | ||
64. zipWith : (a -> b -> c) -> [[a],[b],..,[n]] -> [c,..,n] | ||
**Special Lists** | ||
* 65. lines : String -> [String] | ||
* 66. words : String -> [String] | ||
* 67. unlines : [String] -> String | ||
* 68. unwords : [String] -> String | ||
* 69. nub : Eq a => [a] -> [a] | ||
* 70. delete : Eq a => a -> [a] -> [a] | ||
* 71. difference || diff : Eq a => [a] -> [a] -> [a] | ||
* 72. union : Eq a => [a] -> [a] -> [a] | ||
* 73. intersect : Eq a => [a] -> [a] -> [a] | ||
* 74. sort : Ord a => [a] -> [a] | ||
* 75. insert : Ord a => a -> [a] -> [a] | ||
* lines : String -> [String] | ||
66. words : String -> [String] | ||
67. unlines : [String] -> String | ||
68. unwords : [String] -> String | ||
69. nub : Eq a => [a] -> [a] | ||
70. delete : Eq a => a -> [a] -> [a] | ||
71. difference || diff : Eq a => [a] -> [a] -> [a] | ||
72. union : Eq a => [a] -> [a] -> [a] | ||
73. intersect : Eq a => [a] -> [a] -> [a] | ||
74. sort : Ord a => [a] -> [a] | ||
75. insert : Ord a => a -> [a] -> [a] | ||
**Generalized Functions** | ||
* 76. nubBy : (a -> a -> Bool) -> [a] -> [a] | ||
* 77. deleteBy : (a -> a -> Bool) -> a -> [a] -> [a] | ||
* 78. deleteFirstsBy : (a -> a -> Bool) -> [a] -> [a] -> [a] | ||
* 79. unionBy : (a -> a -> Bool) -> [a] -> [a] -> [a] | ||
* 80. intersectBy : (a -> a -> Bool) -> [a] -> [a] -> [a] | ||
* 81. groupBy : (a -> a -> Bool) -> [a] -> [[a]] | ||
* 82. sortBy : (a -> a -> Ordering) -> [a] -> [a] | ||
* 83. insertBy : (a -> a -> Ordering) -> a -> [a] -> [a] | ||
* 84. maximumBy : (a -> a -> Ordering) -> [a] -> a | ||
* 85. minimumBy : (a -> a -> Ordering) -> [a] -> a | ||
* nubBy : (a -> a -> Bool) -> [a] -> [a] | ||
77. deleteBy : (a -> a -> Bool) -> a -> [a] -> [a] | ||
78. deleteFirstsBy : (a -> a -> Bool) -> [a] -> [a] -> [a] | ||
79. unionBy : (a -> a -> Bool) -> [a] -> [a] -> [a] | ||
80. intersectBy : (a -> a -> Bool) -> [a] -> [a] -> [a] | ||
81. groupBy : (a -> a -> Bool) -> [a] -> [[a]] | ||
82. sortBy : (a -> a -> Ordering) -> [a] -> [a] | ||
83. insertBy : (a -> a -> Ordering) -> a -> [a] -> [a] | ||
84. maximumBy : (a -> a -> Ordering) -> [a] -> a | ||
85. minimumBy : (a -> a -> Ordering) -> [a] -> a | ||
**Extra Functional Utilities** | ||
* 86. genericExcludeChar : | ||
* 87. forEach || each : | ||
* 88. keys : | ||
* 89. enumeration || enum : | ||
* 90. composeL || pipe : | ||
* 91. composeR || sequence : | ||
* 92. partial || part : | ||
* 93. flip : | ||
* 94. compare : | ||
* 95. GT,LT,EQ : | ||
* 96. bubbleSort : | ||
* 97. mergeSort : | ||
* genericExcludeChar : | ||
87. forEach || each : | ||
88. keys : | ||
89. enumeration || enum : | ||
90. composeL || pipe : | ||
91. composeR || sequence : | ||
92. partial || part : | ||
93. flip : | ||
94. compare : | ||
95. GT,LT,EQ : | ||
96. bubbleSort : | ||
97. mergeSort : | ||
------ | ||
<a name='append'/> | ||
###append : arr|str -> arr|str|num -> [x]|str | ||
### append : arr|str -> arr|str|num -> [x]|str | ||
------ | ||
@@ -195,3 +200,3 @@ **Description**: A prefix-style Array.prototype.concat wrapper. | ||
<a name='head'/> | ||
###head : arr|str -> x | ||
### head : arr|str -> x | ||
------ | ||
@@ -211,3 +216,3 @@ **Description**: Retreive the first element of an Array or a String. | ||
<a name='last'/> | ||
###last : arr|str -> x | ||
### last : arr|str -> x | ||
------ | ||
@@ -227,3 +232,3 @@ **Description**: Retreive the last element of an Array or a String. | ||
<a name='init'/> | ||
###init : arr|str -> [x] | ||
### init : arr|str -> [x] | ||
------ | ||
@@ -243,3 +248,3 @@ **Description**: Retreive all elements except the last of an Array or a String. | ||
<a name='tail'/> | ||
###tail : arr|str -> [x] | ||
### tail : arr|str -> [x] | ||
------ | ||
@@ -259,3 +264,3 @@ **Description**: Retreive all elements except the first of an Array or a String. | ||
<a name='nil'/> | ||
###nil : arr|str -> boolean | ||
### nil : arr|str -> boolean | ||
------ | ||
@@ -277,3 +282,3 @@ **Description**: Test if an Array or String is empty. | ||
<a name='map'/> | ||
###map : [x] -> f -> [x] | ||
### map : [x] -> f -> [x] | ||
------ | ||
@@ -295,3 +300,3 @@ **Description**: Array returned by applying f to each element of [x] | ||
<a name='rev'/> | ||
###rev : [x] -> [x] | ||
### rev : [x] -> [x] | ||
------ | ||
@@ -311,3 +316,3 @@ **Description**: Array returned by reversing the order of each element. | ||
<a name='intersperse'/> | ||
###intersperse : x -> [x] -> arr|str | ||
### intersperse : x -> [x] -> arr|str | ||
------ | ||
@@ -328,3 +333,3 @@ **Description**: Array or String returned by interspersing a given separator between elements of a given Array. | ||
<a name='intercalate'/> | ||
###intercalate : [x] -> [[x]] -> [x] | ||
### intercalate : [x] -> [[x]] -> [x] | ||
------ | ||
@@ -344,3 +349,3 @@ **Description**: Array returned by flattening the result of interspersing an Array of varaibles into an Array of Arrays. | ||
<a name='transpose'/> | ||
###transpose : [[x]] -> [[x]] | ||
### transpose : [[x]] -> [[x]] | ||
------ | ||
@@ -359,3 +364,3 @@ **Description**: Array returned by transposing rows and columns of given arguments. | ||
<a name='subsequences'/> | ||
###subsequences : [x] -> [[x]] | ||
### subsequences : [x] -> [[x]] | ||
------ | ||
@@ -374,3 +379,3 @@ **Description**: Array of Arrays of all subsequences of a given arguement. | ||
<a name='permutations'/> | ||
###permutations : [x]|str -> [[x]]|[str] | ||
### permutations : [x]|str -> [[x]]|[str] | ||
------ | ||
@@ -389,3 +394,3 @@ **Description**: Array of Arrays or Array of Strings returned by getting all permutations of a given arguement. | ||
<a name='foldl'/> | ||
###foldl : x -> [x]|str -> f -> x | ||
### foldl : x -> [x]|str -> f -> x | ||
------ | ||
@@ -405,3 +410,3 @@ **Description**: Variable returned reducing left to right by applying a binary operator function (f) on a starting variable (x), known as the accumulator, and an Array of variables or String | ||
<a name='foldl1'/> | ||
###foldl1 : [x]|str -> f -> x | ||
### foldl1 : [x]|str -> f -> x | ||
------ | ||
@@ -420,3 +425,3 @@ **Description**: Variant of foldl without a starting variable (The accumulator begins with the 0th index of the passed Array or String). Use with non-empty Arrays or Strings. | ||
<a name='foldr'/> | ||
###foldr : x -> [x]|str -> f -> x | ||
### foldr : x -> [x]|str -> f -> x | ||
------ | ||
@@ -437,3 +442,3 @@ **Description**: Variable returned reducing right to left by applying a binary operator function (f) on a starting variable (x), known as the accumulator, and an Array of variables or String | ||
<a name='foldr1'/> | ||
###foldr1 : [x]|str -> f -> x | ||
### foldr1 : [x]|str -> f -> x | ||
------ | ||
@@ -452,3 +457,3 @@ **Description**: Variant of foldr without a starting variable (The accumulator begins with the 0th index of the passed Array or String). Use with non-empty Arrays or Strings. | ||
<a name='flatten'/> | ||
###flatten || concat : [[x]]|[str] -> [x]|str | ||
### flatten || concat : [[x]]|[str] -> [x]|str | ||
------ | ||
@@ -467,3 +472,3 @@ **Description**: Flatten an Array of Arrays or an Array of String into an Array of variables or String respectively. | ||
<a name='concatMap'/> | ||
###concatMap : [x]|str -> f -> [x]|str | ||
### concatMap : [x]|str -> f -> [x]|str | ||
------ | ||
@@ -486,3 +491,3 @@ **Description**: Array of variables or String returned by mapping a function over an Array of variables or String and flattening the result | ||
<a name='and'/> | ||
###and : [boolean] -> boolean | ||
### and : [boolean] -> boolean | ||
------ | ||
@@ -501,3 +506,3 @@ **Description**: Boolean returned by the conjunction of an Array of booleans. True if all booleans are true. False if one or more booleans is false. | ||
<a name='or'/> | ||
###or : [boolean] -> boolean | ||
### or : [boolean] -> boolean | ||
------ | ||
@@ -516,3 +521,3 @@ **Description**: Boolean returned by the disjunction of an Array of booleans. True if at least one boolean is true. False if all booleans are false. | ||
<a name='any'/> | ||
###any : [x]|str -> f -> boolean | ||
### any : [x]|str -> f -> boolean | ||
------ | ||
@@ -531,3 +536,3 @@ **Description**: Boolean returned by applying a predicate function to each element in an Array of variables or String. True if at least one f(x) is true. False if all f(x) are false. | ||
<a name='all'/> | ||
###all : [x]|str -> f -> boolean | ||
### all : [x]|str -> f -> boolean | ||
------ | ||
@@ -547,3 +552,3 @@ **Description**: Boolean returned by applying a predicate function to each element in an Array of variables or String. True if all f(x) are true. False if any f(x) are false. | ||
<a name='sum'/> | ||
###sum : [num] -> num | ||
### sum : [num] -> num | ||
------ | ||
@@ -562,3 +567,3 @@ **Description**: Number returned by summing the numbers of an Array together. | ||
<a name='product'/> | ||
###product : [num] -> num | ||
### product : [num] -> num | ||
------ | ||
@@ -577,3 +582,3 @@ **Description**: Number returned by computing the product of the numbers of an Array. | ||
<a name='maximum'/> | ||
###maximum : [num] -> num | ||
### maximum : [num] -> num | ||
------ | ||
@@ -592,3 +597,3 @@ **Description**: Maximum number returned from numbers of an Array. | ||
<a name='minimum'/> | ||
###minimum : [num] -> num | ||
### minimum : [num] -> num | ||
------ | ||
@@ -607,3 +612,3 @@ **Description**: Minimum number returned from numbers of an Array. | ||
<a name='maxList'/> | ||
###maxList : [[x]] -> [x] | ||
### maxList : [[x]] -> [x] | ||
------ | ||
@@ -622,3 +627,3 @@ **Description**: Array of variables with the maximum length returned from an Array of Arrays of variables. | ||
<a name='minList'/> | ||
###minList : [[x]] -> [x] | ||
### minList : [[x]] -> [x] | ||
------ | ||
@@ -637,3 +642,3 @@ **Description**: Array of variables with the minimum length returned from an Array of Arrays of variables. | ||
<a name='scanl'/> | ||
###scanl : x -> [x]|str -> f -> [x] | ||
### scanl : x -> [x]|str -> f -> [x] | ||
------ | ||
@@ -652,3 +657,3 @@ **Description**: Array of variables returned building left to right, starting with the accumulator (x) by applying a binary operator function (f) on a starting variable (x) and an Array of variables or String | ||
<a name='scanr'/> | ||
###scanr : x -> [x]|str -> f -> [x] | ||
### scanr : x -> [x]|str -> f -> [x] | ||
------ | ||
@@ -667,3 +672,3 @@ **Description**: Array of variables returned building right to left, starting with the accumulator (x) by applying a binary operator function (f) on a starting variable (x) and an Array of variables or String | ||
<a name='mapAccumL'/> | ||
###mapAccumL : x -> [x]|str -> f -> [x, [x]] | ||
### mapAccumL : x -> [x]|str -> f -> [x, [x]] | ||
------ | ||
@@ -683,3 +688,3 @@ **Description**: Builds an Array containing a accumulator (x) and the result of applying f to the supplied accumulator and each element of the supplied Array from left to right. | ||
<a name='mapAccumR'/> | ||
###mapAccumR : x -> [x]|str -> f -> [x, [x]] | ||
### mapAccumR : x -> [x]|str -> f -> [x, [x]] | ||
------ | ||
@@ -699,3 +704,3 @@ **Description**: Builds an Array containing a accumulator (x) and the result of applying f to the supplied accumulator and each element of the supplied Array from right to left. | ||
<a name='iterate'/> | ||
###iterate : x -> num -> f -> [x] | ||
### iterate : x -> num -> f -> [x] | ||
------ | ||
@@ -715,3 +720,3 @@ **Description**: Builds an Array containing the successive application of f to the previous result of f(x) until the stop (num) reaches 0. | ||
<a name='replicate'/> | ||
###replicate : x -> num -> [x] | ||
### replicate : x -> num -> [x] | ||
------ | ||
@@ -731,3 +736,3 @@ **Description**: Builds an Array containing replications of x until the stop (num) reaches 0. | ||
<a name='cycle'/> | ||
###cycle : [x]|str -> num -> [x]|str | ||
### cycle : [x]|str -> num -> [x]|str | ||
------ | ||
@@ -746,3 +751,3 @@ **Description**: Builds an Array containing replications of flattened [x]|String until the stop (num) reaches 0. | ||
<a name='unfold'/> | ||
###unfold : f -> f -> f -> x -> [x]|str | ||
### unfold : f -> f -> f -> x -> [x]|str | ||
------ | ||
@@ -772,3 +777,3 @@ **Description**: Builds an Array from a seed value. Arg 1 is the predicate function. If the predicate fails, return an empty Array, otherwise concatenate the result of Arg 2 (f) applied to Arg 4 (x) to the recursive call of unfold calling Arg 3 (f) to Arg 4 (x). This is a corecursive anamorphism. | ||
<a name='take'/> | ||
###take : num -> [x]|str -> [x] | ||
### take : num -> [x]|str -> [x] | ||
------ | ||
@@ -787,3 +792,3 @@ **Description**: Array of variables returned by taking the first n (num) elements from [x] or String. | ||
<a name='drop'/> | ||
###drop : num -> [x]|str -> [x] | ||
### drop : num -> [x]|str -> [x] | ||
------ | ||
@@ -802,3 +807,3 @@ **Description**: Array of variables returned by dropping the first n (num) elements from [x] or String. | ||
<a name='splitAt'/> | ||
###splitAt : num -> [x]|str -> [[x],[x]] | ||
### splitAt : num -> [x]|str -> [[x],[x]] | ||
------ | ||
@@ -817,3 +822,3 @@ **Description**: Array of two Arrays returned. The first Array contains the first n elements of the supplied Array of variables or String. The second contains the rest. | ||
<a name='takeWhile'/> | ||
###takeWhile : f -> [x]|str -> [x] | ||
### takeWhile : f -> [x]|str -> [x] | ||
------ | ||
@@ -833,3 +838,3 @@ **Description**: Array of variables returned by taking elements from [x]|String that satisfy a supplied predicate function until that predicate function is unsatisfied. | ||
<a name='dropWhile'/> | ||
###dropWhile : f -> [x]|str -> [x] | ||
### dropWhile : f -> [x]|str -> [x] | ||
------ | ||
@@ -849,3 +854,3 @@ **Description**: Array of variables returned by dropping elements from [x]|String that satisfy a supplied predicate function until that predicate function is unsatisfied. | ||
<a name='span'/> | ||
###span : arr|str -> f -> [[x], [x]|str] | ||
### span : arr|str -> f -> [[x], [x]|str] | ||
------ | ||
@@ -865,3 +870,3 @@ **Description**: An Array of Array of variables and Array of variables or String (psuedo-tuple) is returned. The first element is the longest prefix of an Array of variables or String that satisfy a predicate function f. The second element is the rest of the list. | ||
<a name='break'/> | ||
###break : arr|str -> f -> [[x], [x]|str] | ||
### break : arr|str -> f -> [[x], [x]|str] | ||
------ | ||
@@ -881,3 +886,3 @@ **Description**: An Array of Array of variables and Array of variables or String (psuedo-tuple) is returned. The first element is the longest prefix of an Array of variables or String that do not satisfy a predicate function f. The second element is the rest of the list. | ||
<a name='stripPrefix'/> | ||
###stripPrefix : [num]|str -> [num]|str -> [num]|[str] | ||
### stripPrefix : [num]|str -> [num]|str -> [num]|[str] | ||
------ | ||
@@ -884,0 +889,0 @@ **Description**: Argument 1 is the prefix. Argument 2 is the target. The arguments must be of the same type. This function drops the prefix from the target and returns the representation as an Array of Numbers or an Array of Strings. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
64606
6
588
850
0
1