forked from purescript-contrib/purescript-arraybuffer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathST.js
More file actions
35 lines (32 loc) · 726 Bytes
/
ST.js
File metadata and controls
35 lines (32 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"use strict";
exports.peekSTTypedArrayImpl = function(dictIsArrayType) {
return function (just) {
return function (nothing) {
return function (xs) {
return function (i) {
return function () {
return i >= 0 && i < xs.length ? just(xs[i]) : nothing;
};
};
};
};
};
};
exports.pokeSTTypedArray = function (dictIsArrayType) {
return function (xs) {
return function (i) {
return function (a) {
return function () {
var ret = i >= 0 && i < xs.length;
if (ret) xs[i] = a;
return ret;
};
};
};
};
};
exports.copyImpl = function (xs) {
return function () {
return xs.slice();
};
};