projects
/
php-functional.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
640efb3
)
introduce lt predicate (<)
author
widmogrod
<widmogrod@gmail.com>
Sun, 11 Feb 2018 00:45:12 +0000
(
01:45
+0100)
committer
widmogrod
<widmogrod@gmail.com>
Sun, 18 Feb 2018 17:47:11 +0000
(18:47 +0100)
src/Functional/predicates.php
patch
|
blob
|
history
diff --git
a/src/Functional/predicates.php
b/src/Functional/predicates.php
index
bb6b41b
..
f1373e1
100644
(file)
--- a/
src/Functional/predicates.php
+++ b/
src/Functional/predicates.php
@@
-21,6
+21,24
@@
function eql($expected, $value = null)
})(...func_get_args());
}
+const lt = 'Widmogrod\Functional\lt';
+
+/**
+ * lt :: a -> a -> Bool
+ *
+ * @param mixed $expected
+ * @param mixed $value
+ *
+ * @return mixed
+ */
+function lt($expected, $value = null)
+{
+ return curryN(2, function ($expected, $value) {
+ return $value < $expected;
+ })(...func_get_args());
+}
+
+
const orr = 'Widmogrod\Functional\orr';
/**