moy-fp
Version:
A functional programming library.
24 lines (20 loc) • 402 B
JavaScript
import __ from '../../src/Function/__'
/**
* b -> a -> a | b
*/
import or from '../../src/Logic/or'
test('or(not using __), return a',() => {
expect(
or('')('murakami')
).toBe('murakami')
})
test('or(not using __), return b',() => {
expect(
or('murakami')('')
).toBe('murakami')
})
test('or(using __), return a',() => {
expect(
or(__, 'murakami')('')
).toBe('murakami')
})