List.remove
Func.memoize
zip-all
and zip-with-all
corner case (no input)unique-by
, minimum-by
List
functions: maximum-by
, minimum-by
, unique-by
List
functions: at
, elem-index
, elem-indices
, find-index
, find-indices
Str
functions: capitalize
, camelize
, dasherize
Func
function: over
- eg. same-length = (==) `over` (.length)
Str.repeat
through main prelude
objectfoldr
and foldr1
, the new correct definition is backwards incompatible with the old, incorrect onefix
flatten
- slight change with bug fix, flattens arrays only, not array-like objectsdrop-while
and take-while
Obj.map
), or use chars
or values
in other cases to transform into a list(obj.)
in LiveScript to do thatprelude = require('prelude-ls')
compact
, split
, flatten
, difference
, intersection
, union
, count-by
, group-by
, chars
, unchars
, apply
lists-to-obj
which takes a list of keys and list of values and zips them up into an object, and the converse obj-to-lists
pairs-to-obj
which takes a list of pairs (2 element lists) and creates an object, and the converse obj-to-pairs
cons
, append
- use the concat operatorcompose
- use the compose operatorobj-to-func
- use partially applied access (eg. (obj.)
)length
- use (.length)
sort-by
renamed to sort-with
sort-by
compare
- just use the new sort-by
break-it
renamed break-list
, (Str.break-str
for the string version)Str.repeat
which creates a new string by repeating the input n timesunfold
as alias to unfoldr
is no longer usedfix
, a fixpoint (Y combinator) for anonymous recursive functionsunfoldr
(alias unfold
)replicate
with a string now returns a list of stringspartial
, just use native partial application in LiveScript using the _
placeholder, or curryingsort
, sortBy
, and compare
lookup
- use (.prop)call
- use (.func arg1, arg2)pluck
- use map (.prop), xshead
and last
prelude-browser.js
prelude-min.js
to prelude-browser-min.js
zip
to zipAll
zipWith
to zipAllWith
zip
, a curried zip that takes only two argumentszipWith
, a curried zipWith that takes only two argumentsparition
functioncurry
functionelem
function (use in
)notElem
function (use not in
)listToObject
unique
objToFunc
error
(just use throw)tau
constantjoin
values
keys
partial
log
to ln
head
: first
installPrelude
helpermin/max
are now curried and take only 2 argumentscall