prelude-ls
prelude-ls copied to clipboard
prelude.ls is a functionally oriented utility library - powerful and flexible, almost all of functions are curried. It is written in, and is the recommended base library for, http://livescript.net
Is that any particular reason why `scan1`/`scanl1` [returns `void` when the input is an empty list](https://github.com/gkz/prelude-ls/blob/d69be8fd8a682321ba24eced17caf3a1b8ca73b8/src/List.ls#L228)? Why not just return an empty list instead?
``` Livescript async-each = (func, arr) --> items = arr.slice! go = -> item = items.splice(0, 1).0 if item? func item, go go! ``` example ``` Livescript [1,2,3] |> async-each...
The use case for this is rarer, but it's in Haskell and I do _sometimes_ need it. When I do, it's just on the server side, so this is what...
I'm not sure if this belongs in prelude, but I would love a built-in debounce such as exists in lodash/underscore. It's not a big deal to just define my own,...
It would be nice that prelude-ls have a ES6 Iterator module. Something like [qit](https://github.com/no22/qit) library.
Propose to add `window` function for lists that provides a sliding window of a given size over the input. The result is an array of windows where is window is...
``` livescript # checking for null and undefined const item = test |> maybe (.maybe-not-exists-prop) |> maybe (.deeply-prop) # return new object with additional properties const item = test |>...
Works almost exactly like zip, except it can takes lists of different lengths: ``` interlace [1, 2, 3], ['a', 'b'] # => [1, 'a', 2, 'b', 3] ``` I'm not...
create a deep copy of objects/arrays gkz/LiveScript#224
Native JS `[].map` and `[].forEach` call the given function with `function(element, index, array)`. I think the List functions that take functions in prelude would benefit from the same thing -...