moy-fp
Version:
A functional programming library.
18 lines (15 loc) • 349 B
JavaScript
import __ from '../../src/Function/__'
/**
* String -> [a] -> String
*/
import intercalate from '../../src/List/intercalate'
test('intercalate(not using __)', () => {
expect(
intercalate(',')([1, 2, 3, 4])
).toBe('1,2,3,4')
})
test('intercalate(using __)', () => {
expect(
intercalate(__, [1, 2, 3, 4])(',')
).toBe('1,2,3,4')
})