Rename forall
and exists
to all
and any
. I ended up liking these names better and they do not clash with the potential introduction of forall
in types.
This commit is contained in:
parent
d0bf8667c2
commit
8b72e0db01
2 changed files with 6 additions and 6 deletions
|
@ -191,12 +191,12 @@ var List = function() {
|
|||
return concat(map(f_76)(x))
|
||||
}
|
||||
}
|
||||
function forall(pred) {
|
||||
function all(pred) {
|
||||
return foldl(function(x) { return function(acc) {
|
||||
return acc && pred(x);
|
||||
};})(true);
|
||||
}
|
||||
function exists(pred) {
|
||||
function any(pred) {
|
||||
return foldl(function(x) { return function(acc) {
|
||||
return acc || pred(x);
|
||||
};})(false);
|
||||
|
@ -464,8 +464,8 @@ var List = function() {
|
|||
concatMap:concatMap,
|
||||
and:and,
|
||||
or:or,
|
||||
forall:forall,
|
||||
exists:exists,
|
||||
all:all,
|
||||
any:any,
|
||||
sum:sum,
|
||||
product:product,
|
||||
maximum:maximum,
|
||||
|
|
|
@ -77,8 +77,8 @@ var Prelude = function() {
|
|||
foldl1 : Data.List.foldl1,
|
||||
and : Data.List.and,
|
||||
or : Data.List.or,
|
||||
forall : Data.List.forall,
|
||||
exists : Data.List.exists,
|
||||
all : Data.List.all,
|
||||
any : Data.List.any,
|
||||
sum : Data.List.sum,
|
||||
product : Data.List.product,
|
||||
concat : Data.List.concat,
|
||||
|
|
Loading…
Reference in a new issue