Skip to content

Commit

Permalink
Merge 852ec04 into 1e7914e
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikiyengar committed Oct 27, 2018
2 parents 1e7914e + 852ec04 commit 9571f78
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/pointfree/both.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function both(m) {
return m.both()
}

throw new TypeError('both: Arrow, Function or Star required')
throw new TypeError('both: Strong Function or Profunctor required')
}

module.exports = both
2 changes: 1 addition & 1 deletion src/pointfree/both.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('both pointfree', t => {

t.ok(isFunction(both), 'is a function')

const err = /both: Arrow, Function or Star required/
const err = /both: Strong Function or Profunctor required/
t.throws(f(undefined), err, 'throws if arg is undefined')
t.throws(f(null), err, 'throws if arg is null')
t.throws(f(0), err, 'throws if arg is a falsey number')
Expand Down
2 changes: 1 addition & 1 deletion src/pointfree/coalesce.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function coalesce(f, g, m) {
}

throw new TypeError(
'coalesce: Async, Either, Maybe or Result required for third argument'
'coalesce: Sum Type required for third argument'
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/pointfree/coalesce.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('coalesce pointfree', t => {
t.throws(m(unit, [], f), err, 'throws if second arg is an array')
t.throws(m(unit, {}, f), err, 'throws if second arg is an object')

const last = /coalesce: Async, Either, Maybe or Result required for third argument/
const last = /coalesce: Sum Type required for third argument/
t.throws(m(unit, unit, undefined), last, 'throws if third arg is undefined')
t.throws(m(unit, unit, null), last, 'throws if third arg is null')
t.throws(m(unit, unit, 0), last, 'throws if third arg is a falsey number')
Expand Down
2 changes: 1 addition & 1 deletion src/pointfree/either.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function either(lf, rf, m) {

if(!(m && isFunction(m.either))) {
throw new TypeError(
'either: Last argument must be an Either or Maybe'
'either: Last argument must be a Sum Type'
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/pointfree/either.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('either pointfree', t => {
t.throws(f(unit, [], m), err, 'throws if second arg passed an array')
t.throws(f(unit, {}, m), err, 'throws if second arg passed an object')

const last = /either: Last argument must be an Either or Maybe/
const last = /either: Last argument must be a Sum Type/
t.throws(f(unit, unit, undefined), last, 'throws if third arg undefined')
t.throws(f(unit, unit, null), last, 'throws if third arg passed null')
t.throws(f(unit, unit, 0), last, 'throws if third arg passed a falsey number')
Expand Down
2 changes: 1 addition & 1 deletion src/pointfree/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const isFunction = require('../core/isFunction')

function option(x, m) {
if(!(m && isFunction(m.option))) {
throw new TypeError('option: Last argument must be a Maybe')
throw new TypeError('option: Last argument must be a Maybe, First or Last')
}

return m.option(x)
Expand Down
2 changes: 1 addition & 1 deletion src/pointfree/option.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test('option pointfree', t => {

t.ok(isFunction(option), 'is a function')

const err = /option: Last argument must be a Maybe/
const err = /option: Last argument must be a Maybe, First or Last/
t.throws(f(0, undefined), err, 'throws if undefined in second arg')
t.throws(f(0, null), err, 'throws if passed null in second arg')
t.throws(f(0, 0), err, 'throws if passed a falsey number in second arg')
Expand Down
2 changes: 1 addition & 1 deletion src/pointfree/second.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function second(m) {
return m.second()
}

throw new TypeError('second: Arrow, Function or Star required')
throw new TypeError('second: Strong Function or Profunctor required')
}

module.exports = second
2 changes: 1 addition & 1 deletion src/pointfree/second.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test('second pointfree', t => {

t.ok(isFunction(second), 'is a function')

const err = /second: Arrow, Function or Star required/
const err = /second: Strong Function or Profunctor required/
t.throws(s(undefined), err, 'throws if arg is undefined')
t.throws(s(null), err, 'throws if arg is null')
t.throws(s(0), err, 'throws if arg is a falsey number')
Expand Down

0 comments on commit 9571f78

Please sign in to comment.