blob: 94913a137b63ddf3ff434e48e484f5e66eeb6c4c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
local fun = require "mason-core.functional.function"
local _ = {}
_.equals = fun.curryN(function(expected, value)
return value == expected
end, 2)
_.prop_eq = fun.curryN(function(property, value, tbl)
return tbl[property] == value
end, 3)
_.prop_satisfies = fun.curryN(function(predicate, property, tbl)
return predicate(tbl[property])
end, 3)
return _
|