git.iko.soy/rowtype-yoga/purescript-native
on 354e793 help sign in
32 lines 608 B history raw
2//: forall e. FVect Z e
3exports.fnil = [];
5//: forall n e. e -> FVect n e -> FVect (S n) e
6exports.fcons = function (hd) {
7 return function (tl) {
8 return [hd].concat(tl);
9 };
10};
12exports.fappend = function (dict) {
13 return function (left) {
14 return function (right) {
15 return left.concat(right);
16 };
17 };
18};
20exports.fflatten = function (dict) {
21 return function (v) {
22 var accRef = [];
23 for (var indexRef = 0; indexRef < v.length; indexRef += 1) {
24 accRef = accRef.concat(v[indexRef]);
25 }
26 return accRef;
27 };
28};
30exports.ftoArray = function (vect) {
31 return vect;
32};