UNPKG
p
Version:
latest (0.2.0)
0.2.0
0.1.1
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
pattern matching in javascript for asyncronous iteration
github.com/dscape/p
dscape/p
p
/
samples
/
declaring_in_a_library.test.js
5 lines
(4 loc)
•
145 B
JavaScript
View Raw
1
2
3
4
5
/* [ 2, 4, 6 ] */
var
map =
require
(
'./hof'
).
map
;
map
(
function
duplicate
(
x
) {
return
x*
2
; }, [
1
,
2
,
3
], [],
function
(
x
) {
console
.
error
(x); });